mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
wasm: Implement List.prepend
This commit is contained in:
parent
176322d099
commit
e5e56a7795
2 changed files with 42 additions and 4 deletions
|
@ -630,7 +630,7 @@ fn list_append_longer_list() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn list_prepend() {
|
||||
assert_evals_to!("List.prepend [] 1", RocList::from_slice(&[1]), RocList<i64>);
|
||||
assert_evals_to!(
|
||||
|
@ -669,7 +669,7 @@ fn list_prepend() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn list_prepend_bools() {
|
||||
assert_evals_to!(
|
||||
"List.prepend [True, False] True",
|
||||
|
@ -679,7 +679,7 @@ fn list_prepend_bools() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn list_prepend_big_list() {
|
||||
assert_evals_to!(
|
||||
"List.prepend [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 100, 100, 100, 100] 9",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue