wasm: Implement List.prepend

This commit is contained in:
Brian Carroll 2022-07-05 20:20:21 +01:00
parent 176322d099
commit e5e56a7795
No known key found for this signature in database
GPG key ID: 9CF4E3BF9C4722C7
2 changed files with 42 additions and 4 deletions

View file

@ -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",