MCPcopy Create free account
hub / github.com/RenderKit/embree / assertionEnded

Method assertionEnded

tutorials/external/catch.hpp:10403–10428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10401 }
10402
10403 void RunContext::assertionEnded(AssertionResult const & result) {
10404 if (result.getResultType() == ResultWas::Ok) {
10405 m_totals.assertions.passed++;
10406 m_lastAssertionPassed = true;
10407 } else if (!result.isOk()) {
10408 m_lastAssertionPassed = false;
10409 if( m_activeTestCase->getTestCaseInfo().okToFail() )
10410 m_totals.assertions.failedButOk++;
10411 else
10412 m_totals.assertions.failed++;
10413 }
10414 else {
10415 m_lastAssertionPassed = true;
10416 }
10417
10418 // We have no use for the return value (whether messages should be cleared), because messages were made scoped
10419 // and should be let to clear themselves out.
10420 static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)));
10421
10422 if (result.getResultType() != ResultWas::Warning)
10423 m_messageScopes.clear();
10424
10425 // Reset working state
10426 resetAssertionInfo();
10427 m_lastResult = result;
10428 }
10429 void RunContext::resetAssertionInfo() {
10430 m_lastAssertionInfo.macroName = StringRef();
10431 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