mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
If no assertions print custom message
This commit is contained in:
parent
ecb9432763
commit
2f086ae255
@ -315,9 +315,14 @@ namespace Catch {
|
||||
}
|
||||
|
||||
void printTotals( const Totals& totals ) {
|
||||
if( totals.assertions.total() == 0 ) {
|
||||
if( totals.testCases.total() == 0 ) {
|
||||
stream << "No tests ran";
|
||||
}
|
||||
else if( totals.assertions.total() == 0 ) {
|
||||
Colour colour( Colour::Yellow );
|
||||
printCounts( "test case", totals.testCases );
|
||||
stream << " (no assertions)";
|
||||
}
|
||||
else if( totals.assertions.failed ) {
|
||||
Colour colour( Colour::ResultError );
|
||||
printCounts( "test case", totals.testCases );
|
||||
|
Loading…
Reference in New Issue
Block a user