Skip to content

fail("reason") #207

@cgay

Description

@cgay

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions