diff --git a/include/internal/catch_assertionhandler.cpp b/include/internal/catch_assertionhandler.cpp index a5a2e2c1..11305d93 100644 --- a/include/internal/catch_assertionhandler.cpp +++ b/include/internal/catch_assertionhandler.cpp @@ -63,7 +63,7 @@ namespace Catch { } AssertionHandler::~AssertionHandler() { if ( !m_completed ) { - handle( ResultWas::ThrewException, "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE" ); + handleMessage(ResultWas::ThrewException, "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"); m_resultCapture.exceptionEarlyReported(); } } @@ -85,7 +85,7 @@ namespace Catch { void AssertionHandler::handle( ResultWas::OfType resultType ) { handle( resultType, nullptr, false ); } - void AssertionHandler::handle( ResultWas::OfType resultType, StringRef const& message ) { + void AssertionHandler::handleMessage(ResultWas::OfType resultType, StringRef const &message) { AssertionResultData data( resultType, LazyExpression( false ) ); data.message = message; handle( data, nullptr ); @@ -133,7 +133,7 @@ namespace Catch { } void AssertionHandler::handleUnexpectedInflightException() { - handle( ResultWas::ThrewException, Catch::translateActiveException() ); + handleMessage(ResultWas::ThrewException, Catch::translateActiveException()); } void AssertionHandler::handleExceptionThrownAsExpected() { @@ -151,7 +151,6 @@ namespace Catch { handle( Catch::ResultWas::Ok ); } - // This is the overload that takes a string and infers the Equals matcher from it // The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ) { diff --git a/include/internal/catch_assertionhandler.h b/include/internal/catch_assertionhandler.h index 7eee7f2d..2f408d25 100644 --- a/include/internal/catch_assertionhandler.h +++ b/include/internal/catch_assertionhandler.h @@ -54,9 +54,7 @@ namespace Catch { } void handleExpr( ITransientExpression const& expr ); - void handle( ResultWas::OfType resultType, StringRef const& message ); - void handle( ResultWas::OfType resultType, ITransientExpression const* expr, bool negated ); - void handle( AssertionResultData const& resultData, ITransientExpression const* expr ); + void handleMessage(ResultWas::OfType resultType, StringRef const &message); void handleExceptionThrownAsExpected(); void handleUnexpectedExceptionNotThrown(); @@ -72,6 +70,8 @@ namespace Catch { private: void handle( ResultWas::OfType resultType ); + void handle( ResultWas::OfType resultType, ITransientExpression const* expr, bool negated ); + void handle( AssertionResultData const& resultData, ITransientExpression const* expr ); }; void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ); diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp index fcdeabf9..ce812ada 100644 --- a/include/internal/catch_capture.hpp +++ b/include/internal/catch_capture.hpp @@ -116,7 +116,7 @@ #define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, ... ) \ do { \ Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \ - catchAssertionHandler.handle( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \ + catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \ INTERNAL_CATCH_REACT( catchAssertionHandler ) \ } while( false )