aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRobert Peterson <robert.peterson@gmail.com>2019-04-16 15:24:35 -0700
committerLouis Pilfold <louis@lpil.uk>2019-04-17 16:12:57 +0100
commit469e88eef91320815d709ca79b512479b2427420 (patch)
treef90d7274f300990c81c0bae80554287a5df8f3ad /test
parent7275a9ef72e79bbf33a47abdb72b4596a10505d8 (diff)
downloadgleam_stdlib-469e88eef91320815d709ca79b512479b2427420.tar.gz
gleam_stdlib-469e88eef91320815d709ca79b512479b2427420.zip
Add list:any
Diffstat (limited to 'test')
-rw-r--r--test/list_test.gleam11
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)
+}