Print special float values as Num.nanF64, etc

This commit is contained in:
Andy Ferris 2024-05-17 22:56:17 +10:00 committed by Luke Boswell
parent 9c3a8a4565
commit 664b1754d0
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
2 changed files with 62 additions and 11 deletions

View file

@ -102,8 +102,13 @@ fn num_ceil_checked_division_success() {
#[test]
fn float_division_by_zero() {
expect_success("1f64 / 0", "∞ : F64");
expect_success("-1f64 / 0", "-∞ : F64");
expect_success("1f64 / 0", "Num.infinityF64 : F64");
expect_success("-1f64 / 0", "-Num.infinityF64 : F64");
expect_success("0f64 / 0", "Num.nanF64 : F64");
expect_success("1f32 / 0", "Num.infinityF32 : F32");
expect_success("-1f32 / 0", "-Num.infinityF32 : F32");
expect_success("0f32 / 0", "Num.nanF32 : F32");
}
#[test]