mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 23:36:11 +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 ) {
|
void printTotals( const Totals& totals ) {
|
||||||
if( totals.assertions.total() == 0 ) {
|
if( totals.testCases.total() == 0 ) {
|
||||||
stream << "No tests ran";
|
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 ) {
|
else if( totals.assertions.failed ) {
|
||||||
Colour colour( Colour::ResultError );
|
Colour colour( Colour::ResultError );
|
||||||
printCounts( "test case", totals.testCases );
|
printCounts( "test case", totals.testCases );
|
||||||
|
Loading…
Reference in New Issue
Block a user