// Called from the TestRunnerThread. void TestRunnerModel::addFailure( const CPPUNIT_NS::TestFailure &failure ) { addFailureInfo( new TestFailureInfo( failure.failedTest(), failure.thrownException(), failure.isError() ) ); }
void MockTestListener::addFailure( const CPPUNIT_NS::TestFailure &failure ) { if ( m_hasExpectationForAddFailure || m_hasExpectationForSomeFailure ) ++m_addFailureCall; if ( m_hasExpectationForAddFailure ) { CPPUNIT_ASSERT_MESSAGE( m_name + ": unexpected call", m_addFailureCall <= m_expectedAddFailureCallCount ); } if ( m_hasParametersExpectationForAddFailure ) { CPPUNIT_ASSERT_MESSAGE( m_name + ": bad test", m_expectedFailedTest == failure.failedTest() ); CPPUNIT_ASSERT_MESSAGE( m_name + ": bad thrownException", m_expectedException == failure.thrownException() ); CPPUNIT_ASSERT_MESSAGE( m_name + ": bad isError", m_expectedIsError == failure.isError() ); } }
void addFailure(const CPPUNIT_NS::TestFailure &failure) { CPPUNIT_NS::stdCOut() << " : " << (failure.isError() ? "error" : "assertion"); m_lastTestFailed = true; }