mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
Wrap expr results if they contain newlines
This commit is contained in:
parent
2927c240a1
commit
c563f6b1be
@ -82,7 +82,9 @@ namespace Catch {
|
||||
else if( m_exprComponents.op == "matches" )
|
||||
return m_exprComponents.lhs + " " + m_exprComponents.rhs;
|
||||
else if( m_exprComponents.op != "!" ) {
|
||||
if( m_exprComponents.lhs.size() + m_exprComponents.rhs.size() < 40 )
|
||||
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 )
|
||||
return m_exprComponents.lhs + " " + m_exprComponents.op + " " + m_exprComponents.rhs;
|
||||
else
|
||||
return m_exprComponents.lhs + "\n" + m_exprComponents.op + "\n" + m_exprComponents.rhs;
|
||||
|
Loading…
Reference in New Issue
Block a user