Example #1
0
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");
    }
}
Example #2
0
 void meta_require(const location& location_)
 {
   const test_result result = test_result::build<Pred>(location_);
   BOOST_REQUIRE_MESSAGE(result.success(), result);
 }
Example #3
0
 void meta_check(const location& location_)
 {
   const test_result result = test_result::build<Pred>(location_);
   BOOST_CHECK_MESSAGE(result.success(), result);
 }
Example #4
0
 void meta_warn(const location& location_)
 {
   const test_result result = test_result::build<Pred>(location_);
   BOOST_WARN_MESSAGE(result.success(), result);
 }