Fix issue with fatal errors and non-failing assertions

Fixes #990
This commit is contained in:
Phil Nash 2017-08-10 17:10:13 +01:00 committed by Martin Hořeňovský
parent 4f21bb72ff
commit 9688891868
2 changed files with 7 additions and 0 deletions

View File

@ -295,6 +295,7 @@ namespace Catch {
Totals deltaTotals; Totals deltaTotals;
deltaTotals.testCases.failed = 1; deltaTotals.testCases.failed = 1;
deltaTotals.assertions.failed = 1;
m_reporter->testCaseEnded( TestCaseStats( testInfo, m_reporter->testCaseEnded( TestCaseStats( testInfo,
deltaTotals, deltaTotals,
std::string(), std::string(),

View File

@ -407,3 +407,9 @@ TEST_CASE( "has printf", "" ) {
// This can cause problems as, currently, stdout itself is not redirect - only the cout (and cerr) buffer // This can cause problems as, currently, stdout itself is not redirect - only the cout (and cerr) buffer
printf( "spanner" ); printf( "spanner" );
} }
TEST_CASE( "null deref", "[.][failing][!nonportable]" ) {
CHECK( false );
int *x = NULL;
*x = 1;
}