|
kaycxx-assert
C++ assertion library
|
Asserts that a function throws an exception of the expected type and expected message.
The expected exception type must derive from std::exception. Derived exception types match, like instanceof in JavaScript. Message checks use what() and can be exact string checks or regex checks.
The assertion fails when the function does not throw, throws a different exception type, or throws the expected type with the wrong message.