mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 14:09:26 +00: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:
parent
05e42cb65c
commit
9c1f9a8f9a
15 changed files with 390 additions and 238 deletions
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue