Completed NoAssertions warning implementation

This commit is contained in:
Phil Nash 2012-08-31 08:10:36 +01:00
parent 55764c8d47
commit a70fbe3c1a
12 changed files with 668 additions and 513 deletions

View file

@ -74,7 +74,10 @@ namespace Catch {
virtual void StartSection( const std::string& sectionName, const std::string& ) {
openLabel( recordSections, sectionName );
}
virtual void NoAssertionsInSection( const std::string& ) {}
virtual void NoAssertionsInTestCase( const std::string& ) {}
virtual void EndSection( const std::string& sectionName, const Counts& ) {
closeLabel( recordSections, sectionName );
}
@ -162,6 +165,9 @@ namespace Catch {
<< "' to succeed but there was/ were "
<< totals.assertions.failed << " failure(s)" );
}
else {
SUCCEED( "Tests passed, as expected" );
}
break;
case Expected::ToFail:
if( totals.assertions.passed > 0 ) {
@ -171,6 +177,9 @@ namespace Catch {
<< "' to fail but there was/ were "
<< totals.assertions.passed << " success(es)" );
}
else {
SUCCEED( "Tests failed, as expected" );
}
break;
}
};