void test::test::run_test(test_result& results) { try { results.start(_name); (*this)(); results.success(_name); } catch (const test_failure& tf) { results.failure(_name, tf.what()); } catch (const std::exception& se) { results.error(_name, se.what()); } catch (...) { results.error(_name, "Unknown exception"); } }
void meta_require(const location& location_) { const test_result result = test_result::build<Pred>(location_); BOOST_REQUIRE_MESSAGE(result.success(), result); }
void meta_check(const location& location_) { const test_result result = test_result::build<Pred>(location_); BOOST_CHECK_MESSAGE(result.success(), result); }
void meta_warn(const location& location_) { const test_result result = test_result::build<Pred>(location_); BOOST_WARN_MESSAGE(result.success(), result); }