aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2023-04-10 10:29:09 +0100
committerLouis Pilfold <louis@lpil.uk>2023-04-10 10:29:39 +0100
commit46444ebcf6b128ca9fa4c4919744724f964e0f4c (patch)
treecffde484121ef675a98ed3d5d3fb401b0c17ffe6 /test
parent6cf47153491774954755a422be2391f3a013c8ef (diff)
downloadgleam_stdlib-46444ebcf6b128ca9fa4c4919744724f964e0f4c.tar.gz
gleam_stdlib-46444ebcf6b128ca9fa4c4919744724f964e0f4c.zip
Peter's bug
Diffstat (limited to 'test')
-rw-r--r--test/gleam/map_test.gleam25
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))
+}