mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
Nonempty list with always true condition List.keepIf test
This commit is contained in:
parent
efbc8b4192
commit
ad41d0f26e
@ -149,6 +149,27 @@ mod gen_list {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_keep_if_always_true_for_non_empty_list() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
alwaysTrue : Int -> Bool
|
||||
alwaysTrue = \i ->
|
||||
True
|
||||
|
||||
oneThroughEight : List Int
|
||||
oneThroughEight =
|
||||
[1,2,3,4,5,6,7,8]
|
||||
|
||||
List.keepIf oneThroughEight alwaysTrue
|
||||
"#
|
||||
),
|
||||
&[1, 2, 3, 4, 5, 6, 7, 8],
|
||||
&'static [i64]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_keep_if_always_false_for_non_empty_list() {
|
||||
assert_evals_to!(
|
||||
|
Loading…
Reference in New Issue
Block a user