summaryrefslogtreecommitdiff
path: root/tests/modules/hashset/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-10-06 23:31:21 +0800
committerruki <[email protected]>2024-10-06 23:31:21 +0800
commit0ee97cd2935031e4181383c15e8121b1f52461c1 (patch)
treeb48a34a6958d3523bca81a20e091d658863fa07c /tests/modules/hashset/test.lua
parentd329532d12907f2f27f7c336ab0498700931317a (diff)
add clone and eq to hashset
Diffstat (limited to 'tests/modules/hashset/test.lua')
-rw-r--r--tests/modules/hashset/test.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/modules/hashset/test.lua b/tests/modules/hashset/test.lua
index a0df5a61d..be75815ed 100644
--- a/tests/modules/hashset/test.lua
+++ b/tests/modules/hashset/test.lua
@@ -13,5 +13,13 @@ function test_hashset(t)
t:require(item > prev)
prev = item
end
+ local h2 = h:clone()
+ t:require(h == h2)
+ h2:insert(11)
+ t:require_not(h == h2)
+ h2:remove(11)
+ t:require(h == h2)
+ h2:clear()
+ t:require(h2:empty())
end