diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/list_test.gleam | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/list_test.gleam b/test/list_test.gleam index a24c7b8..2afd9e2 100644 --- a/test/list_test.gleam +++ b/test/list_test.gleam @@ -173,3 +173,14 @@ pub fn all_test() { list:all([], fn(_) { False }) |> expect:equal(_, True) } + +pub fn any_test() { + list:any([1,2,3,4,5], fn(x) { x == 2 }) + |> expect:equal(_, True) + + list:any([1,2,3,4,5], fn(x) { x < 0 }) + |> expect:equal(_, False) + + list:any([], fn(_) { False }) + |> expect:equal(_, False) +} |