MCPcopy Create free account
hub / github.com/apache/trafficserver / assertionEnded

Method assertionEnded

lib/catch2/catch.hpp:12791–12816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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