Refactored assertion builder stuff out of expression builder

This commit is contained in:
Phil Nash 2012-10-18 08:39:44 +01:00
parent c96f9330a0
commit 3ad13256e1
6 changed files with 102 additions and 111 deletions

View file

@ -148,10 +148,6 @@ namespace Catch {
return actOnCurrentResult();
}
virtual void acceptMessage( const std::string& msg ) {
m_currentResult.setMessage( msg );
}
virtual void testEnded( const AssertionResult& result ) {
if( result.getResultType() == ResultWas::Ok ) {
m_totals.assertions.passed++;
@ -293,8 +289,10 @@ namespace Catch {
// This just means the test was aborted due to failure
}
catch(...) {
acceptMessage( getRegistryHub().getExceptionTranslatorRegistry().translateActiveException() );
acceptResult( ResultWas::ThrewException );
m_currentResult
.setResultType( ResultWas::ThrewException )
<< translateActiveException();
actOnCurrentResult();
}
m_info.clear();
}