mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-28 15:39:27 +00:00
Completed NoAssertions warning implementation
This commit is contained in:
parent
55764c8d47
commit
a70fbe3c1a
12 changed files with 668 additions and 513 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue