Home | Libraries | People | FAQ | More |
BOOST_
level
_THROW(
expression
,
exception
)
asserts that
expression
throws an exception of type exception
or a type derived from exception
.
static void always_throws() { throw std::runtime_error("whoops"); } BOOST_AUTO_TEST_CASE(example_throw) { BOOST_REQUIRE_THROW(always_throws(), std::runtime_error); }