MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / getExpressionInMacro

Method getExpressionInMacro

extern/Catch2/catch.hpp:8348–8360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8346 }
8347
8348 std::string AssertionResult::getExpressionInMacro() const {
8349 std::string expr;
8350 if( m_info.macroName.empty() )
8351 expr = static_cast<std::string>(m_info.capturedExpression);
8352 else {
8353 expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );
8354 expr += m_info.macroName;
8355 expr += "( ";
8356 expr += m_info.capturedExpression;
8357 expr += " )";
8358 }
8359 return expr;
8360 }
8361
8362 bool AssertionResult::hasExpandedExpression() const {
8363 return hasExpression() && getExpandedExpression() != getExpression();

Callers 2

writeAssertionMethod · 0.80

Calls 3

emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected