DRTVWR-476: Add LLTHROW()/LOG_UNHANDLED_EXCEPTION() test.

llexception_test.cpp is about discovering appropriate infrastructure to get
good information from the LLTHROW() and LOG_UNHANDLED_EXCEPTION() mechanism.
But we didn't before have a test that actually exercises them. Now we do.
master
Nat Goodspeed 2019-11-18 20:17:01 -05:00
parent cc9bdbcf19
commit b41a2eff45
1 changed files with 15 additions and 0 deletions

View File

@ -305,4 +305,19 @@ namespace tut
std::cout << center("int", '=', margin) << std::endl;
catch_several(throw_int, "throw_int");
}
template<> template<>
void object::test<2>()
{
set_test_name("reporting exceptions");
try
{
LLTHROW(LLException("badness"));
}
catch (...)
{
LOG_UNHANDLED_EXCEPTION("llexception test<2>()");
}
}
} // namespace tut