MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / getExpressionInMacro

Method getExpressionInMacro

unittests/catch.hpp:5114–5126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5112 }
5113
5114 std::string AssertionResult::getExpressionInMacro() const {
5115 std::string expr;
5116 if( m_info.macroName[0] == 0 )
5117 expr = m_info.capturedExpression;
5118 else {
5119 expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );
5120 expr += m_info.macroName;
5121 expr += "( ";
5122 expr += m_info.capturedExpression;
5123 expr += " )";
5124 }
5125 return expr;
5126 }
5127
5128 bool AssertionResult::hasExpandedExpression() const {
5129 return hasExpression() && getExpandedExpression() != getExpression();

Callers 1

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected