Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

streamlined acceptResult

Commit
e3b111a39a4edd3bfe4d88290c99c723b8b74417
Author
Phil Nash ·
Parents
3ad13256e1e5

Files · Download .tar.gz

Changes

 include/internal/catch_capture.hpp          |  2 +-
 include/internal/catch_interfaces_capture.h |  2 --
 include/internal/catch_runner_impl.hpp      | 10 +---------
 3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp
index c43c944f..7c731727 100644
--- a/include/internal/catch_capture.hpp
+++ b/include/internal/catch_capture.hpp
@@ -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 ) \
diff --git a/include/internal/catch_interfaces_capture.h b/include/internal/catch_interfaces_capture.h
index baf5b711..56790cb4 100644
--- a/include/internal/catch_interfaces_capture.h
+++ b/include/internal/catch_interfaces_capture.h
@@ -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;        
diff --git a/include/internal/catch_runner_impl.hpp b/include/internal/catch_runner_impl.hpp
index 048a988b..05275f14 100644
--- a/include/internal/catch_runner_impl.hpp
+++ b/include/internal/catch_runner_impl.hpp
@@ -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();