lean2/tests/lua/extra.lua
Leonardo de Moura 37b5570e99 test(lua): add .olean corrupted file tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-31 12:51:33 -07:00

11 lines
254 B
Lua

-- Execute f, and make sure is throws an error
function check_error(f)
ok, msg = pcall(function ()
f()
end)
if ok then
error("unexpected success...")
else
print("caught expected error: ", msg:what())
end
end