test(tests/lua): exercise fields method for semantic attachments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
438fa8251b
commit
2368c936d3
1 changed files with 8 additions and 0 deletions
8
tests/lua/fields.lua
Normal file
8
tests/lua/fields.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
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())
|
Loading…
Reference in a new issue