fix 32-bit wasm to num conversion

This commit is contained in:
Folkert 2022-12-20 16:34:24 +01:00
parent af4023f116
commit acf22ebf7e
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 17 additions and 19 deletions

View file

@ -1362,18 +1362,7 @@ fn str_trim_right_small_to_small_shared() {
#[test]
#[cfg(any(feature = "gen-llvm"))]
fn str_to_nat() {
assert_evals_to!(
indoc!(
r#"
when Str.toNat "1" is
Ok n -> n
Err _ -> 0
"#
),
1,
usize
);
assert_evals_to!(r#"Str.toNat "1" |> Result.withDefault 0"#, 1, usize);
}
#[test]