mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
modify test to sidestep wasm gen bug
This commit is contained in:
parent
ec8467f6bb
commit
12d1d7386b
1 changed files with 6 additions and 2 deletions
|
@ -991,7 +991,7 @@ fn list_walk_until_sum() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))]
|
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||||
fn list_walk_with_index_until_sum() {
|
fn list_walk_with_index_until_sum() {
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
r#"
|
r#"
|
||||||
|
@ -999,7 +999,11 @@ fn list_walk_with_index_until_sum() {
|
||||||
if elem % 2 == 0 then
|
if elem % 2 == 0 then
|
||||||
Break state
|
Break state
|
||||||
else
|
else
|
||||||
Continue (elem + index + state)
|
# Convert to I64 to sidestep weird bug with WASM codegen
|
||||||
|
a = Num.toI64 elem
|
||||||
|
b = Num.toI64 index
|
||||||
|
c = Num.toI64 state
|
||||||
|
Continue (a + b + c)
|
||||||
)
|
)
|
||||||
"#,
|
"#,
|
||||||
13,
|
13,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue