diff options
author | Aki <please@ignore.pl> | 2024-08-02 23:08:06 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2024-08-02 23:08:06 +0200 |
commit | 71ae0ff1f713e45430ea02a1ff1e46ab2d28b63c (patch) | |
tree | 03eb631cfbd7ff812b152182db2e9ec6426e17a4 /spec | |
parent | 2f8c80182b43042b63a94b9226cb1966217d4a0f (diff) | |
download | headers-71ae0ff1f713e45430ea02a1ff1e46ab2d28b63c.zip headers-71ae0ff1f713e45430ea02a1ff1e46ab2d28b63c.tar.gz headers-71ae0ff1f713e45430ea02a1ff1e46ab2d28b63c.tar.bz2 |
Multiset ref counter will no longer go into negative numbers
Diffstat (limited to 'spec')
-rw-r--r-- | spec/multiset_spec.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/multiset_spec.lua b/spec/multiset_spec.lua index 7639066..abdeb94 100644 --- a/spec/multiset_spec.lua +++ b/spec/multiset_spec.lua @@ -95,6 +95,13 @@ describe("Values", function() it("are not counted after removal", function() assert.are.equal(1, #set) end) + + it("are removed only once", function() + set:remove"will-be-removed" + assert.is_false(set:has"will-be-removed") + set:add"will-be-removed" + assert.is_true(set:has"will-be-removed") + end) end) |