Testing module

require_that

procedureextensionsince 0.30.0Source

assert_that, then returns from the procedure it is written in (which must return nothing) when the check fails.

Example↗
require_that("hello", has_length(5));
require_that :: (value: $T, matcher: Matcher, loc := #caller_location)

assert_that, then returns from the procedure it is written in (which must return nothing) when the check fails.

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.
Example↗
require_that("hello", has_length(5));

See also