This commit is contained in:
Folkert 2021-11-27 16:36:43 +01:00
parent a1fd34feef
commit 79d5c82dfb
12 changed files with 186 additions and 70 deletions

View file

@ -227,18 +227,6 @@ fn from_list() {
RocList<i64>
);
assert_evals_to!(
indoc!(
r#"
[]
|> Set.fromList
|> Set.toList
"#
),
RocList::default(),
RocList<i64>
);
assert_evals_to!(
indoc!(
r#"
@ -254,3 +242,39 @@ fn from_list() {
RocList<i64>
);
}
#[test]
#[cfg(any(feature = "gen-llvm"))]
fn from_list_void() {
assert_evals_to!(
indoc!(
r#"
[]
|> Set.fromList
|> Set.toList
"#
),
RocList::default(),
RocList<i64>
);
}
#[test]
#[cfg(any(feature = "gen-llvm"))]
fn from_list_result() {
assert_evals_to!(
indoc!(
r#"
x : Result Str {}
x = Ok "foo"
[ x ]
|> Set.fromList
|> Set.toList
|> List.len
"#
),
1,
i64
);
}