Eliminate some work when results won't be reported.

This commit is contained in:
Neal Coombes authored and Martin Hořeňovský committed 2017-08-01 22:49:27 +02:00
1 parent 28741467d5
commit 2212cdfe26
6 files changed
+60 -20

No files matched your search

+14
View File
@@ -213,6 +213,20 @@ namespace Catch {
m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, false));
}
bool RunContext::lastAssertionPassed() {
return m_totals.assertions.passed == (m_prevPassed + 1);
}
void RunContext::assertionPassed() {
++m_totals.assertions.passed;
m_lastAssertionInfo.capturedExpression = "{Unknown expression after the reported line}";
m_lastAssertionInfo.macroName = "";
}
void RunContext::assertionRun() {
m_prevPassed = m_totals.assertions.passed;
}
bool RunContext::aborting() const {
return m_totals.assertions.failed == static_cast<std::size_t>(m_config->abortAfter());
}