mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Print special float values as Num.nanF64, etc
This commit is contained in:
parent
9c3a8a4565
commit
664b1754d0
2 changed files with 62 additions and 11 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue