diff --git a/src/math/floorf.rs b/src/math/floorf.rs index 7d631df..8a63874 100644 --- a/src/math/floorf.rs +++ b/src/math/floorf.rs @@ -37,3 +37,11 @@ pub fn floorf(x: f32) -> f32 { } return f32::from_bits(ui); } + +#[cfg(test)] +mod tests { + #[test] + fn no_overflow() { + assert_eq!(super::floorf(0.5), 0.0); + } +}