lean2/tests/lua/old/num2.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

10 lines
345 B
Lua

assert(nVal(10):data() == mpz(10))
assert(not pcall(function() nVal(-10) end))
assert(iVal(10):data() == mpz(10))
assert(iVal(-10):data() == mpz(-10))
assert(rVal(10):data() == mpq(10))
assert(rVal(10):data() ~= mpz(10))
assert(rVal("10/3"):data() == mpq(10)/3)
assert(rVal("-10/3"):data() == mpq(-10)/3)
assert(Const("a"):data() == name("a"))