mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +01:00
Green summary bar is darker if not all passed
- and the green part now comes at the end (to emphasise the failures)
This commit is contained in:
parent
d89e74faff
commit
cab9141eec
@ -32,6 +32,9 @@ namespace Catch {
|
||||
std::size_t total() const {
|
||||
return passed + failed + failedButOk;
|
||||
}
|
||||
bool allPassed() const {
|
||||
return failed == 0 && failedButOk == 0;
|
||||
}
|
||||
|
||||
std::size_t passed;
|
||||
std::size_t failed;
|
||||
|
@ -388,9 +388,12 @@ namespace Catch {
|
||||
while( failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH-1 )
|
||||
findMax( failedRatio, failedButOkRatio, passedRatio )--;
|
||||
|
||||
stream << Colour( Colour::ResultSuccess ) << std::string( passedRatio, '=' );
|
||||
stream << Colour( Colour::Error ) << std::string( failedRatio, '=' );
|
||||
stream << Colour( Colour::ResultExpectedFailure ) << std::string( failedButOkRatio, '=' );
|
||||
if( totals.testCases.allPassed() )
|
||||
stream << Colour( Colour::ResultSuccess ) << std::string( passedRatio, '=' );
|
||||
else
|
||||
stream << Colour( Colour::Success ) << std::string( passedRatio, '=' );
|
||||
}
|
||||
else {
|
||||
stream << Colour( Colour::Warning ) << std::string( CATCH_CONFIG_CONSOLE_WIDTH-1, '=' );
|
||||
|
Loading…
Reference in New Issue
Block a user