shouldBeLess

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

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

Parameters

a
Type: T

The value to test.

b
Type: U

The value it should be less than.

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 AssertError with expected and actual values.

Examples

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

Meta