aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2019-04-18 22:11:30 +0000
committerLouis Pilfold <louis@lpil.uk>2019-04-18 23:29:08 +0100
commit6f486a387b623d962868bc514ebe5fcdea84e012 (patch)
treeb6f9158494b11401399f3dabad7840b82c4c8313 /test
parent187b55bd3f5e8492a522734e0a2591e7c749f580 (diff)
downloadgleam_stdlib-6f486a387b623d962868bc514ebe5fcdea84e012.tar.gz
gleam_stdlib-6f486a387b623d962868bc514ebe5fcdea84e012.zip
map_dict:Map -> map:MapDict, map_dict:take
Diffstat (limited to 'test')
-rw-r--r--test/map_dict_test.gleam11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/map_dict_test.gleam b/test/map_dict_test.gleam
index 02b7072..f72e23a 100644
--- a/test/map_dict_test.gleam
+++ b/test/map_dict_test.gleam
@@ -111,3 +111,14 @@ pub fn values_test() {
|> map_dict:values
|> expect:equal(_, [0, 1, 2])
}
+
+pub fn take_test() {
+ [
+ {"a", 0},
+ {"b", 1},
+ {"c", 2},
+ ]
+ |> map_dict:from_list
+ |> map_dict:take(_, ["a", "b", "d"])
+ |> expect:equal(_, map_dict:from_list([{"a", 0}, {"b", 1}]))
+}