aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2020-05-19 19:20:48 +0100
committerLouis Pilfold <louis@lpil.uk>2020-05-19 19:22:49 +0100
commit1ee8dbf4c7e5abf831e3118f8953b24c4043e70f (patch)
tree57b6635aa724baa17f5f01eccb68c8a936bd36bf /test
parent5ca885bd114635244d25f2f91c35bda448e6a635 (diff)
downloadgleam_stdlib-1ee8dbf4c7e5abf831e3118f8953b24c4043e70f.tar.gz
gleam_stdlib-1ee8dbf4c7e5abf831e3118f8953b24c4043e70f.zip
dynamic.map
Diffstat (limited to 'test')
-rw-r--r--test/gleam/dynamic_test.gleam12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/gleam/dynamic_test.gleam b/test/gleam/dynamic_test.gleam
index 4f314e9..5b5a88c 100644
--- a/test/gleam/dynamic_test.gleam
+++ b/test/gleam/dynamic_test.gleam
@@ -304,3 +304,15 @@ pub fn tuple2_of_test() {
|> dynamic.tuple2
|> should.equal(Error("Expected a 2 element tuple, got an int"))
}
+
+pub fn map_test() {
+ map.new()
+ |> dynamic.from
+ |> dynamic.map
+ |> should.equal(Ok(map.new()))
+
+ 1
+ |> dynamic.from
+ |> dynamic.map
+ |> should.equal(Error("Expected a map, got an int"))
+}