lean2/tests/lua/level1.lua
Leonardo de Moura 450128e28b refactor(lua): cleanup Lua bindings, and add accessor/tester to expr Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-13 11:46:09 -08:00

22 lines
571 B
Lua

l = level()
assert(is_level(l))
assert(l:is_bottom())
assert(l:kind() == level_kind.UVar)
l = level(l, 1)
assert(is_level(l))
assert(not l:is_bottom())
assert(l:is_lift())
assert(l:kind() == level_kind.Lift)
assert(l:lift_of() == level())
assert(l:lift_offset() == 1)
l = level("U")
assert(l:is_uvar())
assert(l:uvar_name() == name("U"))
assert(not l:is_lift())
l = level(level("U"), level("M"), level("m"))
assert(l:is_max())
assert(l:max_size() == 3)
assert(l:max_level(0) == level("U"))
assert(l:max_level(1) == level("M"))
print(l)
assert(l:kind() == level_kind.Max)