diff options
author | Louis Pilfold <louis@lpil.uk> | 2019-09-15 21:05:05 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2019-09-15 21:06:35 +0100 |
commit | 0579308bf0559635e3742e7fa634648182d916c5 (patch) | |
tree | 3ef129b822133bd2d78ca19a123298e2e0fe3f04 /test/gleam/any_test.gleam | |
parent | 3f316053c680448c4b81a2c04071f7cf81497c2b (diff) | |
download | gleam_stdlib-0579308bf0559635e3742e7fa634648182d916c5.tar.gz gleam_stdlib-0579308bf0559635e3742e7fa634648182d916c5.zip |
Remove maps from stdlib
Diffstat (limited to 'test/gleam/any_test.gleam')
-rw-r--r-- | test/gleam/any_test.gleam | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/gleam/any_test.gleam b/test/gleam/any_test.gleam index ef441d7..13af0cb 100644 --- a/test/gleam/any_test.gleam +++ b/test/gleam/any_test.gleam @@ -4,6 +4,7 @@ import gleam/list import gleam/tuple import gleam/expect import gleam/result +import gleam/map pub fn string_test() { "" @@ -250,18 +251,22 @@ pub fn struct2_test() { pub fn field_test() { let Ok(ok_atom) = atom.from_string("ok") + let Ok(earlier_atom) = atom.from_string("earlier") - {ok = 1} + map.new() + |> map.put(_, ok_atom, 1) |> any.from |> any.field(_, ok_atom) |> expect.equal(_, Ok(any.from(1))) - {earlier = 2, ok = 3} + map.new() + |> map.put(_, ok_atom, 3) + |> map.put(_, earlier_atom, 1) |> any.from |> any.field(_, ok_atom) |> expect.equal(_, Ok(any.from(3))) - {} + map.new() |> any.from |> any.field(_, ok_atom) |> expect.is_error |