Add test for Num.log

This commit is contained in:
Ju Liu 2021-03-28 15:14:43 +01:00
parent 928249df2a
commit 0190bbb06d

View file

@ -361,7 +361,6 @@ mod gen_num {
#[test]
fn f64_sqrt() {
// FIXME this works with normal types, but fails when checking uniqueness types
assert_evals_to!(
indoc!(
r#"
@ -375,6 +374,21 @@ mod gen_num {
);
}
#[test]
fn f64_log() {
assert_evals_to!(
indoc!(
r#"
when Num.log 1 is
Ok val -> val
Err _ -> -1
"#
),
0.0,
f64
);
}
#[test]
fn f64_round_old() {
assert_evals_to!("Num.round 3.6", 4, i64);