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

23 lines
537 B
Lua

local env = environment()
env:import("Int")
parse_lean_cmds([[
variable f : Int -> Int -> Int
notation 20 _ +++ _ : f
print f 10 20
notation 20 _ -+- _ : f
print f 10 20
]], env)
local F = parse_lean('f 10 20', env)
print(lean_formatter(env)(F))
assert(tostring(lean_formatter(env)(F)) == "10 -+- 20")
local child = env:mk_child()
parse_lean_cmds([[
print f 10 20
]], child)
assert(tostring(lean_formatter(env)(F)) == "10 -+- 20")
print(lean_formatter(child)(F))
assert(tostring(lean_formatter(child)(F)) == "10 -+- 20")