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:
Phil Nash 2014-07-03 08:09:57 +01:00
parent 05e42cb65c
commit 9c1f9a8f9a
15 changed files with 390 additions and 238 deletions

View file

@ -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 );
}