shouldBeFalse

Used to assert that one value is equal to false.

void
shouldBeFalse
(
T
)
(
lazy T condition
,
in string message = null
,
in string file = __FILE__
,
in size_t line = __LINE__
)

Parameters

condition
Type: T

The value that should equal false.

message
Type: string

The exception message.

file
Type: string

The file name that the assert failed in. Should be left as default.

line
Type: size_t

The file line that the assert failed in. Should be left as default.

Throws

If values are not false, will throw an UnitTestException with expected and actual values.

Examples

// Will throw an exception like "checkit.exception.UnitTestException@example.d(6): Expected <false>, got <true>"
true.shouldBeFalse();

Meta