assertFalse

Asserts that a condition is false.

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

Throws

AssertException otherwise

Examples

assertFalse(false);
assertFalse("foo" in ["bar" : "foo"]);

auto exception = expectThrows!AssertException(assertFalse(true));

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

Meta