shouldThrowExactly

Verify that expr throws the templated Exception class. This only succeeds if the expression throws an exception of the exact type of the template parameter.

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

Return Value

Type: auto

A ThrownInfo containing info about the throwable

Throws

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

Meta