void cpunit::ExceptionExpectedCall<cpunit::AnyType>::run() { CPUNIT_DTRACE("ExceptionExpectedCall::run called"); bool exceptionThrown = true; try { (*test)(); exceptionThrown = false; } catch (AssertionException &e) { throw e; } catch (...) { CPUNIT_DTRACE("ExceptionExpectedCall::run succeeded"); } if (!exceptionThrown) { fail("No exception thrown from test code."); } }
cpunit::ExecutionReport cpunit::RunAllTestRunner::run(Callable& tu) const { const RegInfo &ri = tu.get_reg_info(); try { CPUNIT_DTRACE("RunAllTestRunner::run on "<<ri.to_string()); return inner_run(tu); } catch(AssertionException &e) { return ExecutionReport(ExecutionReport::FAILURE, e.get_message(), ri); } catch (std::exception &e) { return ExecutionReport(ExecutionReport::ERROR, e.what(), ri); } catch (const char *e) { return ExecutionReport(ExecutionReport::ERROR, e, ri); } catch (...) { return ExecutionReport(ExecutionReport::ERROR, "Unknown exception.", ri); } }
cpunit::TestExecutionFacade::~TestExecutionFacade() { CPUNIT_DTRACE("TestExecutionFacade::~TestExecutionFacade()"); }