mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
More console reporter tweaks and approved new output
This commit is contained in:
parent
bb76e47704
commit
21c479f5aa
@ -140,7 +140,10 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool printResultType( AssertionResult const& _result ) {
|
bool printResultType( AssertionResult const& _result ) {
|
||||||
if( _result.succeeded() ) {
|
if( _result.getResultType() == ResultWas::Info ||
|
||||||
|
_result.getResultType() == ResultWas::Warning ) {
|
||||||
|
}
|
||||||
|
else if( _result.succeeded() ) {
|
||||||
TextColour successColour( TextColour::Success );
|
TextColour successColour( TextColour::Success );
|
||||||
stream << "passed ";
|
stream << "passed ";
|
||||||
}
|
}
|
||||||
@ -181,7 +184,7 @@ namespace Catch {
|
|||||||
std::pair<std::string, std::string> message = getMessage( _result );
|
std::pair<std::string, std::string> message = getMessage( _result );
|
||||||
bool endsWithNewLine = false;
|
bool endsWithNewLine = false;
|
||||||
if( !message.first.empty() ) {
|
if( !message.first.empty() ) {
|
||||||
stream << " " << message.first << ":" << "\n";
|
stream << message.first << ":" << "\n";
|
||||||
endsWithNewLine = true;
|
endsWithNewLine = true;
|
||||||
}
|
}
|
||||||
if( !message.second.empty() ) {
|
if( !message.second.empty() ) {
|
||||||
@ -197,9 +200,9 @@ namespace Catch {
|
|||||||
case ResultWas::DidntThrowException:
|
case ResultWas::DidntThrowException:
|
||||||
return std::make_pair( "because no exception was thrown where one was expected", "" );
|
return std::make_pair( "because no exception was thrown where one was expected", "" );
|
||||||
case ResultWas::Info:
|
case ResultWas::Info:
|
||||||
return std::make_pair( "with info", _result.getMessage() );
|
return std::make_pair( "info", _result.getMessage() );
|
||||||
case ResultWas::Warning:
|
case ResultWas::Warning:
|
||||||
return std::make_pair( "with warning", _result.getMessage() );
|
return std::make_pair( "warning", _result.getMessage() );
|
||||||
case ResultWas::ExplicitFailure:
|
case ResultWas::ExplicitFailure:
|
||||||
return std::make_pair( "explicitly with message", _result.getMessage() );
|
return std::make_pair( "explicitly with message", _result.getMessage() );
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user