shouldBeLess

Used to assert that one value is less than another value.

void
shouldBeLess
(
T
U
)
(
,,
in string message = null
,
in string file = __FILE__
,
in size_t line = __LINE__
)

Parameters

value
Type: T

The value to test.

expected
Type: U

The value it should be less than.

message
Type: string

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 the value is not less, will throw an UnitTestException with expected and actual values.

Examples

// Will throw an exception like "UnitTestException@example.d(6): <5> expected to be less than <10>."
10.shouldBeLess(5);

Meta