diff --git a/src/fill/level.rs b/src/fill/level.rs index 04da362..284da90 100644 --- a/src/fill/level.rs +++ b/src/fill/level.rs @@ -13,4 +13,17 @@ impl FillMode for LevelFillMode { fn sample(&self, level: f32, _: Vector) -> f32 { level } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn sample() { + let mode = LevelFillMode::new(); + + assert_eq!(0.3, mode.sample(0.3, Vector::ZERO)); + assert_eq!(0.7, mode.sample(0.7, Vector::new(0.1, 0.2))); + } } \ No newline at end of file