test(lua): add more level API unit tests

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-05-13 08:49:09 -07:00
parent 9ed700a5a6
commit cfa9520655

14
tests/lua/level5.lua Normal file
View file

@ -0,0 +1,14 @@
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))