lean2/tests/lua/slow/extra.lua
Leonardo de Moura 0f894f4618 chore(*): tag 'slow' tests as 'expensive', and exclude 'expensive' tests when testing under valgrind
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-27 17:47:53 -07:00

11 lines
247 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)
end
end