basic working test case

This commit is contained in:
Folkert 2021-12-02 20:30:58 +01:00
parent 8a21b42c20
commit d6ed2147ae
4 changed files with 27 additions and 5 deletions

View file

@ -1297,3 +1297,20 @@ fn str_trim_right_small_to_small_shared() {
(RocStr, RocStr)
);
}
#[test]
#[cfg(any(feature = "gen-llvm"))]
fn str_to_num() {
assert_evals_to!(
indoc!(
r#"
when Str.toNum "1" is
Ok n -> n
Err _ -> 0
"#
),
1,
i64
);
}