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

14 lines
465 B
Lua

local cex = cex_builder(function(n, cex, a)
if cex then
return cex
else
error("no counterexample")
end
end)
assert(is_cex_builder(cex))
local env = environment()
env:add_var("T", Type())
local a = assignment()
local env2 = cex("main", env, a)
assert(env2:find_object("T"))
assert(not pcall(function() cex("main", nil, a) end))