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

Method assertionEnded

extern/Catch2/catch.hpp:12789–12814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12787 }
12788
12789 void RunContext::assertionEnded(AssertionResult const & result) {
12790 if (result.getResultType() == ResultWas::Ok) {
12791 m_totals.assertions.passed++;
12792 m_lastAssertionPassed = true;
12793 } else if (!result.isOk()) {
12794 m_lastAssertionPassed = false;
12795 if( m_activeTestCase->getTestCaseInfo().okToFail() )
12796 m_totals.assertions.failedButOk++;
12797 else
12798 m_totals.assertions.failed++;
12799 }
12800 else {
12801 m_lastAssertionPassed = true;
12802 }
12803
12804 // We have no use for the return value (whether messages should be cleared), because messages were made scoped
12805 // and should be let to clear themselves out.
12806 static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)));
12807
12808 if (result.getResultType() != ResultWas::Warning)
12809 m_messageScopes.clear();
12810
12811 // Reset working state
12812 resetAssertionInfo();
12813 m_lastResult = result;
12814 }
12815 void RunContext::resetAssertionInfo() {
12816 m_lastAssertionInfo.macroName = StringRef();
12817 m_lastAssertionInfo.capturedExpression = "{Unknown expression after the reported line}"_sr;

Callers

nothing calls this directly

Calls 15

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