lean2/tests/lua/ns1.lua

13 lines
283 B
Lua
Raw Normal View History

local s = name_set()
assert(not s:contains("a"))
s = s:insert("a")
assert(s:contains("a"))
s = s:insert("b")
assert(s:contains("a"))
assert(s:contains("b"))
local s2 = s:erase("a")
assert(s:contains("a"))
assert(s:contains("b"))
assert(not s2:contains("a"))
assert(s2:contains("b"))