MCPcopy Create free account
hub / github.com/catchorg/Catch2 / getExpression

Method getExpression

extras/catch_amalgamated.cpp:673–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671 }
672
673 std::string AssertionResult::getExpression() const {
674 // Possibly overallocating by 3 characters should be basically free
675 std::string expr; expr.reserve(m_info.capturedExpression.size() + 3);
676 if (isFalseTest(m_info.resultDisposition)) {
677 expr += "!(";
678 }
679 expr += m_info.capturedExpression;
680 if (isFalseTest(m_info.resultDisposition)) {
681 expr += ')';
682 }
683 return expr;
684 }
685
686 std::string AssertionResult::getExpressionInMacro() const {
687 if ( m_info.macroName.empty() ) {

Callers 5

printFunction · 0.45
writeAssertionMethod · 0.45
assertionEndedMethod · 0.45

Calls 2

isFalseTestFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected