shouldThrow

Verify that expr throws the templated Exception class. This succeeds if the expression throws a child class of the template parameter.

void
shouldThrow
(
T : Throwable = Exception
E
)
(
lazy E expr
,
in string file = __FILE__
,
in size_t line = __LINE__
)

Throws

UnitTestException on failure (when expr does not throw the expected exception)

Meta