MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / assertionEnded

Method assertionEnded

Bcore/src/main/cpp/Dobby/tests/catch.hpp:8583–8604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8581}
8582
8583void RunContext::assertionEnded(AssertionResult const &result) {
8584 if (result.getResultType() == ResultWas::Ok) {
8585 m_totals.assertions.passed++;
8586 m_lastAssertionPassed = true;
8587 } else if (!result.isOk()) {
8588 m_lastAssertionPassed = false;
8589 if (m_activeTestCase->getTestCaseInfo().okToFail())
8590 m_totals.assertions.failedButOk++;
8591 else
8592 m_totals.assertions.failed++;
8593 } else {
8594 m_lastAssertionPassed = true;
8595 }
8596
8597 // We have no use for the return value (whether messages should be cleared), because messages were made scoped
8598 // and should be let to clear themselves out.
8599 static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)));
8600
8601 // Reset working state
8602 resetAssertionInfo();
8603 m_lastResult = result;
8604}
8605void RunContext::resetAssertionInfo() {
8606 m_lastAssertionInfo.macroName = StringRef();
8607 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