mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Add test for Num.log
This commit is contained in:
parent
928249df2a
commit
0190bbb06d
1 changed files with 15 additions and 1 deletions
|
@ -361,7 +361,6 @@ mod gen_num {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn f64_sqrt() {
|
fn f64_sqrt() {
|
||||||
// FIXME this works with normal types, but fails when checking uniqueness types
|
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
indoc!(
|
indoc!(
|
||||||
r#"
|
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]
|
#[test]
|
||||||
fn f64_round_old() {
|
fn f64_round_old() {
|
||||||
assert_evals_to!("Num.round 3.6", 4, i64);
|
assert_evals_to!("Num.round 3.6", 4, i64);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue