mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-24 13:35:40 +02:00
Added [!mayfail] tag to indicate test case that can fail without failing the suite.
Overhauled the summary report (including the expected failure count)
This commit is contained in:
@@ -262,6 +262,12 @@ namespace Catch {
|
||||
Counts assertions = m_totals.assertions - prevAssertions;
|
||||
bool missingAssertions = testForMissingAssertions( assertions );
|
||||
|
||||
if( testCaseInfo.okToFail() ) {
|
||||
std::swap( assertions.failedButOk, assertions.failed );
|
||||
m_totals.assertions.failed -= assertions.failedButOk;
|
||||
m_totals.assertions.failedButOk += assertions.failedButOk;
|
||||
}
|
||||
|
||||
SectionStats testCaseSectionStats( testCaseSection, assertions, duration, missingAssertions );
|
||||
m_reporter->sectionEnded( testCaseSectionStats );
|
||||
}
|
||||
|
Reference in New Issue
Block a user