From 2f3b2bbaf925c432f0fc128336c4e62b7c9d34a9 Mon Sep 17 00:00:00 2001 From: Richard Viney Date: Fri, 29 Nov 2024 09:53:00 +1300 Subject: Optimise dict equality check on JavaScript --- test/gleam/dict_test.gleam | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/gleam/dict_test.gleam b/test/gleam/dict_test.gleam index 5937e14..d9b8822 100644 --- a/test/gleam/dict_test.gleam +++ b/test/gleam/dict_test.gleam @@ -14,6 +14,14 @@ pub fn from_list_test() { [#(1, 0), #(1, 1)] |> dict.from_list |> should.equal(dict.from_list([#(1, 1)])) + + [#(1, 0), #(2, 1)] + |> dict.from_list + |> should.not_equal(dict.from_list([#(1, 0), #(2, 2)])) + + [#(1, 0), #(2, 1)] + |> dict.from_list + |> should.not_equal(dict.from_list([#(1, 0), #(3, 1)])) } pub fn has_key_test() { -- cgit v1.2.3