Testing module

of_type

procedureextensionsince 0.30.0Source

The value's type is T exactly; for an Any, the type of what it holds.

Example↗
value: Any = 5;
assert_that(value, of_type(s64));
of_type :: ($T: Type) -> Matcher

The value's type is T exactly; for an Any, the type of what it holds.

Parameters

$T: Type
the type the value must have.

Returns

Example↗
value: Any = 5;
assert_that(value, of_type(s64));

See also