Testing module

assert_that

procedure · 1 overloadsince 0.30.0Source

Checks value against matcher; a failure is reported at the caller's line. Returns whether it held.

Example
assert_that(4, greater_than(5));

This one is meant to fail, so there is nothing to run.

assert_that :: (value: $T, matcher: Matcher, loc := #caller_location) -> bool

Checks value against matcher; a failure is reported at the caller's line. Returns whether it held.

Parameters

value: $T
the value to check.
matcher: Matcher
what it should be.
loc := #caller_location
where the check is written, shown when it fails. Leave the default.

Returns

bool
Example
assert_that(4, greater_than(5));

This one is meant to fail, so there is nothing to run.

See also