lean2/tests/lua/ns1.lua
Leonardo de Moura 1a8d75c4f0 feat(util): name_set Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-07 18:32:53 -07:00

12 lines
283 B
Lua

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"))