mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-04 05:09:53 +01:00
streamlined acceptResult
This commit is contained in:
parent
3ad13256e1
commit
e3b111a39a
@ -155,7 +155,7 @@ inline bool isTrue( bool value ){ return value; }
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define INTERNAL_CATCH_MSG( reason, resultType, stopOnFailure, macroName ) \
|
||||
Catch::getResultCapture().acceptExpression( Catch::AssertionResultBuilder().setResultType( resultType ) << reason );
|
||||
INTERNAL_CATCH_ACCEPT_EXPR( Catch::AssertionResultBuilder().setResultType( resultType ) << reason, stopOnFailure, true );
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define INTERNAL_CATCH_SCOPED_INFO( log ) \
|
||||
|
@ -36,8 +36,6 @@ namespace Catch {
|
||||
virtual bool shouldDebugBreak() const = 0;
|
||||
|
||||
virtual void acceptAssertionInfo( const AssertionInfo& assertionInfo ) = 0;
|
||||
virtual ResultAction::Value acceptResult( bool result ) = 0;
|
||||
virtual ResultAction::Value acceptResult( ResultWas::OfType result ) = 0;
|
||||
virtual ResultAction::Value acceptExpression( const AssertionResultBuilder& assertionResult ) = 0;
|
||||
|
||||
virtual std::string getCurrentTestName() const = 0;
|
||||
|
@ -134,15 +134,7 @@ namespace Catch {
|
||||
virtual void acceptAssertionInfo( const AssertionInfo& assertionInfo ) {
|
||||
m_assertionInfo = assertionInfo;
|
||||
}
|
||||
virtual ResultAction::Value acceptResult( bool result ) {
|
||||
return acceptResult( result ? ResultWas::Ok : ResultWas::ExpressionFailed );
|
||||
}
|
||||
|
||||
virtual ResultAction::Value acceptResult( ResultWas::OfType result ) {
|
||||
m_currentResult.setResultType( result );
|
||||
return actOnCurrentResult();
|
||||
}
|
||||
|
||||
|
||||
virtual ResultAction::Value acceptExpression( const AssertionResultBuilder& assertionResult ) {
|
||||
m_currentResult = assertionResult;
|
||||
return actOnCurrentResult();
|
||||
|
Loading…
Reference in New Issue
Block a user