use waterui_core::Environment;
#[cfg_attr(
not(feature = "video-gpu"),
expect(
clippy::missing_const_for_fn,
reason = "the body is empty only in the feature configuration being linted; selecting a realization makes it install one"
)
)]
pub fn install(env: &mut Environment) {
#[cfg(feature = "video-gpu")]
waterui_video_gpu::install(env);
let _ = env;
}
#[cfg(all(test, feature = "video-gpu"))]
mod tests {
use waterui_core::{Environment, view::Hook};
use crate::app::App;
use crate::component::text;
#[test]
fn building_an_app_installs_the_video_realization() {
let env = Environment::new();
assert!(env.get::<Hook<waterui_video::VideoConfig>>().is_none());
let app = App::new(|| text("hello"), env);
assert!(app.env.get::<Hook<waterui_video::VideoConfig>>().is_some());
}
}