From 6f486a387b623d962868bc514ebe5fcdea84e012 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 18 Apr 2019 22:11:30 +0000 Subject: map_dict:Map -> map:MapDict, map_dict:take --- test/map_dict_test.gleam | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') 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}])) +} -- cgit v1.2.3