lean2/tests/lua/old/fields.lua
Leonardo de Moura a6116e3156 test(lua): reactivate some of the Lua unit tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-04-29 10:36:57 -07:00

8 lines
276 B
Lua

assert(nVal(0):fields() == mpz(0))
assert(iVal(-1):fields() == mpz(-1))
assert(rVal("1/2"):fields() == mpq("1/2"))
local env = get_environment()
local add = env:find_object({"Nat", "add"})
assert(add)
assert(add:get_value():fields() == nil)
assert(add:get_value():is_value())