Add a test that overflow does not happen

This commit is contained in:
Alex Crichton
2019-05-02 12:34:05 -07:00
parent 9c4332e286
commit ce7dd93907
+8
View File
@@ -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);
}
}