diff options
author | Julian Schurhammer <julian.schurhammer@gmail.com> | 2022-08-14 00:26:29 +1200 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2023-03-13 10:48:59 +0000 |
commit | 3522d9a57a7ce8c54f57772a89e9ac7dbd34b81f (patch) | |
tree | 1a1e87d26c2d353dac2f38ef3c2e6cf16b8dcd79 | |
parent | 1c50948c6c6b6b7a4a022457835a1a3571cd6126 (diff) | |
download | gleam_stdlib-3522d9a57a7ce8c54f57772a89e9ac7dbd34b81f.tar.gz gleam_stdlib-3522d9a57a7ce8c54f57772a89e9ac7dbd34b81f.zip |
map: add bitstring test
-rw-r--r-- | test/gleam/map_test.gleam | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/gleam/map_test.gleam b/test/gleam/map_test.gleam index cd669f9..9b3fcfe 100644 --- a/test/gleam/map_test.gleam +++ b/test/gleam/map_test.gleam @@ -84,6 +84,21 @@ pub fn get_test() { m |> map.get(C) |> should.equal(Error(Nil)) + + let proplist = [#(<<1, 2, 3>>, 0), #(<<3, 2, 1>>, 1)] + let m = map.from_list(proplist) + + m + |> map.get(<<1, 2, 3>>) + |> should.equal(Ok(0)) + + m + |> map.get(<<3, 2, 1>>) + |> should.equal(Ok(1)) + + m + |> map.get(<<1, 3, 2>>) + |> should.equal(Error(Nil)) } pub fn insert_test() { |