From c87b13a8cdf42332abb720bdb7a8a00871707ecf Mon Sep 17 00:00:00 2001 From: Ross Bencina Date: Sun, 20 Mar 2016 11:28:00 +1100 Subject: [PATCH] see issue #617. m_exprComponents.op is never assigned the value `!`, so don't check for it. --- include/internal/catch_result_builder.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/internal/catch_result_builder.hpp b/include/internal/catch_result_builder.hpp index d453fecf..101f922b 100644 --- a/include/internal/catch_result_builder.hpp +++ b/include/internal/catch_result_builder.hpp @@ -144,7 +144,7 @@ namespace Catch { return m_exprComponents.lhs.empty() ? m_assertionInfo.capturedExpression : m_exprComponents.op + m_exprComponents.lhs; else if( m_exprComponents.op == "matches" ) return m_exprComponents.lhs + " " + m_exprComponents.rhs; - else if( m_exprComponents.op != "!" ) { + else { if( m_exprComponents.lhs.size() + m_exprComponents.rhs.size() < 40 && m_exprComponents.lhs.find("\n") == std::string::npos && m_exprComponents.rhs.find("\n") == std::string::npos ) @@ -152,8 +152,6 @@ namespace Catch { else return m_exprComponents.lhs + "\n" + m_exprComponents.op + "\n" + m_exprComponents.rhs; } - else - return "{can't expand - use " + m_assertionInfo.macroName + "_FALSE( " + m_assertionInfo.capturedExpression.substr(1) + " ) instead of " + m_assertionInfo.macroName + "( " + m_assertionInfo.capturedExpression + " ) for better diagnostics}"; } } // end namespace Catch