Sometimes I just want to be able to say explicitly that a test failed. I can use assert-true(#f, "reason") but I want to be able to say it directly with fail("reason") instead.
A relatively common case where this happens is when verifying errors.
block ()
do-something();
fail("no error signaled");
exception (ex :: <my-error>)
assert-equal(something, ex.something-else);
exception (ex :: <error>)
fail("wrong condition signaled: %s", ex);
end;
Sometimes I just want to be able to say explicitly that a test failed. I can use
assert-true(#f, "reason")but I want to be able to say it directly withfail("reason")instead.A relatively common case where this happens is when verifying errors.