diff options
author | Louis Pilfold <louis@lpil.uk> | 2023-04-10 10:29:09 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2023-04-10 10:29:39 +0100 |
commit | 46444ebcf6b128ca9fa4c4919744724f964e0f4c (patch) | |
tree | cffde484121ef675a98ed3d5d3fb401b0c17ffe6 | |
parent | 6cf47153491774954755a422be2391f3a013c8ef (diff) | |
download | gleam_stdlib-46444ebcf6b128ca9fa4c4919744724f964e0f4c.tar.gz gleam_stdlib-46444ebcf6b128ca9fa4c4919744724f964e0f4c.zip |
Peter's bug
-rw-r--r-- | test/gleam/map_test.gleam | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/gleam/map_test.gleam b/test/gleam/map_test.gleam index 43e17a0..5cfb37d 100644 --- a/test/gleam/map_test.gleam +++ b/test/gleam/map_test.gleam @@ -336,3 +336,28 @@ pub fn size_test() { |> map.size() |> should.equal(18) } + +// https://github.com/gleam-lang/stdlib/issues/435 +pub fn peters_bug_test() { + map.new() + |> map.insert(22, Nil) + |> map.insert(21, Nil) + |> map.insert(23, Nil) + |> map.insert(18, Nil) + |> map.insert(17, Nil) + |> map.insert(19, Nil) + |> map.insert(14, Nil) + |> map.insert(13, Nil) + |> map.insert(15, Nil) + |> map.insert(10, Nil) + |> map.insert(9, Nil) + |> map.insert(11, Nil) + |> map.insert(6, Nil) + |> map.insert(5, Nil) + |> map.insert(7, Nil) + |> map.insert(2, Nil) + |> map.insert(1, Nil) + |> map.insert(3, Nil) + |> map.get(0) + |> should.equal(Error(Nil)) +} |