lean2/tests/lua/level5.lua
Leonardo de Moura cfa9520655 test(lua): add more level API unit tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-13 09:20:10 -07:00

14 lines
484 B
Lua

local l1 = mk_param_univ("l1")
assert(l1:is_param())
local m = mk_meta_univ("m")
assert(m:is_meta())
assert(mk_level_zero():is_explicit())
assert(mk_level_one():is_explicit())
local t1 = mk_level_max(l1, mk_level_one())
assert(t1:has_param())
local t2 = mk_level_imax(mk_level_one(), l1)
assert(t2:is_imax())
assert(not pcall(function() t2:id() end))
assert(not pcall(function() l1:lhs() end))
assert(not pcall(function() l1:rhs() end))
assert(not pcall(function() l1:succ_of() end))