fail

Fails a test.

@safe pure
void
fail
(
string msg = null
,
string file = __FILE__
,
size_t line = __LINE__
)

Throws

AssertException

Examples

auto exception = expectThrows!AssertException(fail());

assertEquals("Assertion failure", exception.msg);

Meta