assertFalse

Asserts that a condition is false.

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

Throws

AssertException otherwise

Examples

1 assertFalse(false);
2 assertFalse("foo" in ["bar": "foo"]);
3 
4 auto exception = expectThrows!AssertException(assertFalse(true));
5 
6 assertEquals("Assertion failure", exception.msg);

Meta