Add new constants to symbol table, attempt to add tests

This commit is contained in:
Andy Ferris 2024-05-03 19:50:12 +10:00
parent a0c4bb571f
commit 03e9344a83
2 changed files with 44 additions and 0 deletions

View file

@ -3901,3 +3901,43 @@ fn f64_from_parts() {
f64
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
fn nan_f32() {
assert_evals_to!(
r"Num.nanF32",
f32::NAN,
f32
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
fn nan_f64() {
assert_evals_to!(
r"Num.nanF64",
f64::NAN,
f64
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
fn infinity_f32() {
assert_evals_to!(
r"Num.infinityF32",
f32::INFINITY,
f32
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
fn infinity_f64() {
assert_evals_to!(
r"Num.infinityF64",
f64::INFINITY,
f64
);
}