mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
basic working test case
This commit is contained in:
parent
8a21b42c20
commit
d6ed2147ae
4 changed files with 27 additions and 5 deletions
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue