mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Merge branch 'trunk' of github.com:rtfeldman/roc into builtin-maxI128
This commit is contained in:
commit
66f07d984e
41 changed files with 3892 additions and 3648 deletions
|
@ -568,6 +568,36 @@ fn list_map_closure() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_map3_group() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
List.map3 [1,2,3] [3,2,1] [2,1,3] (\a, b, c -> Group a b c)
|
||||
"#
|
||||
),
|
||||
RocList::from_slice(&[(1, 3, 2), (2, 2, 1), (3, 1, 3)]),
|
||||
RocList<(i64, i64, i64)>
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_map3_different_length() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
List.map3
|
||||
["a", "b", "d"]
|
||||
["b", "x"]
|
||||
["c"]
|
||||
(\a, b, c -> Str.concat a (Str.concat b c))
|
||||
"#
|
||||
),
|
||||
RocList::from_slice(&[RocStr::from_slice("abc".as_bytes()),]),
|
||||
RocList<RocStr>
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_map2_pair() {
|
||||
assert_evals_to!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue