MCPcopy Create free account
hub / github.com/dirkvdb/ffmpegthumbnailer / reconstructExpression

Method reconstructExpression

test/testframework/catch.hpp:8277–8292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8275 return AssertionResult( m_assertionInfo, data );
8276 }
8277 std::string ResultBuilder::reconstructExpression() const {
8278 if( m_exprComponents.op == "" )
8279 return m_exprComponents.lhs.empty() ? m_assertionInfo.capturedExpression : m_exprComponents.op + m_exprComponents.lhs;
8280 else if( m_exprComponents.op == "matches" )
8281 return m_exprComponents.lhs + " " + m_exprComponents.rhs;
8282 else if( m_exprComponents.op != "!" ) {
8283 if( m_exprComponents.lhs.size() + m_exprComponents.rhs.size() < 40 &&
8284 m_exprComponents.lhs.find("\n") == std::string::npos &&
8285 m_exprComponents.rhs.find("\n") == std::string::npos )
8286 return m_exprComponents.lhs + " " + m_exprComponents.op + " " + m_exprComponents.rhs;
8287 else
8288 return m_exprComponents.lhs + "\n" + m_exprComponents.op + "\n" + m_exprComponents.rhs;
8289 }
8290 else
8291 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}";
8292 }
8293
8294} // end namespace Catch
8295

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.80
findMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected