MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / assertionEnded

Method assertionEnded

tests/catch.hpp:10145–10167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10143 }
10144
10145 void RunContext::assertionEnded(AssertionResult const & result) {
10146 if (result.getResultType() == ResultWas::Ok) {
10147 m_totals.assertions.passed++;
10148 m_lastAssertionPassed = true;
10149 } else if (!result.isOk()) {
10150 m_lastAssertionPassed = false;
10151 if( m_activeTestCase->getTestCaseInfo().okToFail() )
10152 m_totals.assertions.failedButOk++;
10153 else
10154 m_totals.assertions.failed++;
10155 }
10156 else {
10157 m_lastAssertionPassed = true;
10158 }
10159
10160 // We have no use for the return value (whether messages should be cleared), because messages were made scoped
10161 // and should be let to clear themselves out.
10162 static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)));
10163
10164 // Reset working state
10165 resetAssertionInfo();
10166 m_lastResult = result;
10167 }
10168 void RunContext::resetAssertionInfo() {
10169 m_lastAssertionInfo.macroName = StringRef();
10170 m_lastAssertionInfo.capturedExpression = "{Unknown expression after the reported line}"_sr;

Callers

nothing calls this directly

Calls 14

AssertionStatsClass · 0.85
getResultTypeMethod · 0.80
isOkMethod · 0.80
okToFailMethod · 0.80
scopedElementMethod · 0.80
hasExpressionMethod · 0.80
succeededMethod · 0.80
getTestMacroNameMethod · 0.80
getSourceInfoMethod · 0.80
getExpressionMethod · 0.80
getExpandedExpressionMethod · 0.80

Tested by

no test coverage detected