lean2/tests/lua/slow/t1.lua
Leonardo de Moura 162fa25250 test(lua): move slow tests to tests/lua/slow
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-27 10:24:18 -07:00

12 lines
285 B
Lua

function mk_big(f, depth, val)
if depth == 1 then
return Const{"foo", val}
else
return f(mk_big(f, depth - 1, 2 * val), mk_big(f, depth - 1, 2 * val + 1))
end
end
local f = Const("f")
local r1 = mk_big(f, 18, 0)
local r2 = mk_big(f, 18, 0)
assert(r1 == r2)