From 6f1543b1b1e0c579ed432ae168f113a2cbd8cad2 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Mon, 7 May 2012 19:46:19 +0100 Subject: [PATCH] Regenerated single include --- single_include/catch.hpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/single_include/catch.hpp b/single_include/catch.hpp index a112fa92..d1aa46a6 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -991,7 +991,14 @@ namespace Catch else if( m_op == "matches" ) return m_lhs + " " + m_rhs; else if( m_op != "!" ) - return m_lhs + " " + m_op + " " + m_rhs; + { + if( m_lhs.size() + m_rhs.size() < 30 ) + return m_lhs + " " + m_op + " " + m_rhs; + else if( m_lhs.size() < 70 && m_rhs.size() < 70 ) + return "\n\t" + m_lhs + "\n\t" + m_op + "\n\t" + m_rhs; + else + return "\n" + m_lhs + "\n" + m_op + "\n" + m_rhs + "\n\n"; + } else return "{can't expand - use " + m_macroName + "_FALSE( " + m_expr.substr(1) + " ) instead of " + m_macroName + "( " + m_expr + " ) for better diagnostics}"; } @@ -1386,15 +1393,25 @@ namespace Internal template bool compare( long lhs, const T* rhs ) { - return Evaluator::evaluate( reinterpret_cast( NULL ), rhs ); - + return Evaluator::evaluate( reinterpret_cast( lhs ), rhs ); } template bool compare( long lhs, T* rhs ) { return Evaluator::evaluate( reinterpret_cast( lhs ), rhs ); + } + template + bool compare( const T* lhs, long rhs ) + { + return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); + } + + template + bool compare( T* lhs, long rhs ) + { + return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); } } // end of namespace Internal