Add counterpart to containsOrIncl for excl (#6360)
This commit is contained in:
parent
387c88d87b
commit
d1f6ddfd64
4 changed files with 104 additions and 38 deletions
|
|
@ -37,16 +37,26 @@ block setTest2:
|
|||
t.incl("111")
|
||||
t.incl("123")
|
||||
t.excl("111")
|
||||
|
||||
t.incl("012")
|
||||
t.incl("123") # test duplicates
|
||||
|
||||
assert "123" in t
|
||||
assert "111" notin t # deleted
|
||||
|
||||
assert t.missingOrExcl("000") == true
|
||||
assert "000" notin t
|
||||
assert t.missingOrExcl("012") == false
|
||||
assert "012" notin t
|
||||
|
||||
assert t.containsOrIncl("012") == false
|
||||
assert t.containsOrIncl("012") == true
|
||||
assert "012" in t # added back
|
||||
|
||||
for key in items(data): t.incl(key)
|
||||
for key in items(data): assert key in t
|
||||
|
||||
for key in items(data): t.excl(key)
|
||||
for key in items(data): assert key notin t
|
||||
|
||||
block orderedSetTest1:
|
||||
var t = data.toOrderedSet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue