mirror of
https://github.com/ricoriedel/wipe.git
synced 2024-12-23 06:36:42 +00:00
Add test
This commit is contained in:
parent
857b7bc71f
commit
243a01a638
@ -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)));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user