mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
fixing List.all on empty list to be true
This commit is contained in:
parent
81f0f46132
commit
c5484a9ad3
@ -1136,7 +1136,7 @@ pub fn listAll(
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// SWAP ELEMENTS
|
||||
|
@ -2355,7 +2355,7 @@ fn list_any_empty_with_unknown_element_type() {
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
fn list_all() {
|
||||
assert_evals_to!("List.all [] (\\e -> e > 3)", false, bool);
|
||||
assert_evals_to!("List.all [] (\\e -> e > 3)", true, bool);
|
||||
assert_evals_to!("List.all [ 1, 2, 3 ] (\\e -> e > 3)", false, bool);
|
||||
assert_evals_to!("List.all [ 1, 2, 4 ] (\\e -> e > 3)", false, bool);
|
||||
assert_evals_to!("List.all [ 1, 2, 3 ] (\\e -> e >= 1)", true, bool);
|
||||
|
Loading…
Reference in New Issue
Block a user