mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 23:36:11 +01:00
Print ~~~ at start of console output.
Some cleanup in the reporter code
This commit is contained in:
parent
c0b698073e
commit
a46ee0222a
@ -129,9 +129,6 @@ namespace Catch {
|
|||||||
messageLabel = "with message";
|
messageLabel = "with message";
|
||||||
if( _stats.infoMessages.size() > 1 )
|
if( _stats.infoMessages.size() > 1 )
|
||||||
messageLabel = "with messages";
|
messageLabel = "with messages";
|
||||||
// if( result.hasMessage() ){
|
|
||||||
// messageLabel = "with message";
|
|
||||||
// }
|
|
||||||
break;
|
break;
|
||||||
case ResultWas::ThrewException:
|
case ResultWas::ThrewException:
|
||||||
colour = TextColour::Error;
|
colour = TextColour::Error;
|
||||||
@ -152,7 +149,6 @@ namespace Catch {
|
|||||||
case ResultWas::ExplicitFailure:
|
case ResultWas::ExplicitFailure:
|
||||||
passOrFail = "FAILED";
|
passOrFail = "FAILED";
|
||||||
colour = TextColour::Error;
|
colour = TextColour::Error;
|
||||||
// messageLabel = "explicitly with message";
|
|
||||||
if( _stats.infoMessages.size() == 1 )
|
if( _stats.infoMessages.size() == 1 )
|
||||||
messageLabel = "explicitly with message";
|
messageLabel = "explicitly with message";
|
||||||
if( _stats.infoMessages.size() > 1 )
|
if( _stats.infoMessages.size() > 1 )
|
||||||
@ -165,8 +161,6 @@ namespace Catch {
|
|||||||
messageLabel = "with message";
|
messageLabel = "with message";
|
||||||
if( _stats.infoMessages.size() > 1 )
|
if( _stats.infoMessages.size() > 1 )
|
||||||
messageLabel = "with messages";
|
messageLabel = "with messages";
|
||||||
// if( result.hasMessage() )
|
|
||||||
// messageLabel = "with message";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// These cases are here to prevent compiler warnings
|
// These cases are here to prevent compiler warnings
|
||||||
@ -227,8 +221,6 @@ namespace Catch {
|
|||||||
++it ) {
|
++it ) {
|
||||||
stream << wrapLongStrings( it->message ) << "\n";
|
stream << wrapLongStrings( it->message ) << "\n";
|
||||||
}
|
}
|
||||||
// if( !message.empty() )
|
|
||||||
// stream << wrapLongStrings( message ) << "\n";
|
|
||||||
}
|
}
|
||||||
void printSourceInfo() const {
|
void printSourceInfo() const {
|
||||||
TextColour colourGuard( TextColour::FileName );
|
TextColour colourGuard( TextColour::FileName );
|
||||||
@ -263,7 +255,8 @@ namespace Catch {
|
|||||||
m_atLeastOneTestCasePrinted = true;
|
m_atLeastOneTestCasePrinted = true;
|
||||||
}
|
}
|
||||||
void lazyPrintRunInfo() {
|
void lazyPrintRunInfo() {
|
||||||
stream << "\n" << testRunInfo->name
|
stream << "\n" << getTildes() << "\n";
|
||||||
|
stream << testRunInfo->name
|
||||||
<< " is a CATCH v" << libraryVersion.majorVersion << "."
|
<< " is a CATCH v" << libraryVersion.majorVersion << "."
|
||||||
<< libraryVersion.minorVersion << " b"
|
<< libraryVersion.minorVersion << " b"
|
||||||
<< libraryVersion.buildNumber;
|
<< libraryVersion.buildNumber;
|
||||||
@ -379,6 +372,10 @@ namespace Catch {
|
|||||||
static const std::string doubleDashes( CATCH_CONFIG_CONSOLE_WIDTH-1, '=' );
|
static const std::string doubleDashes( CATCH_CONFIG_CONSOLE_WIDTH-1, '=' );
|
||||||
return doubleDashes;
|
return doubleDashes;
|
||||||
}
|
}
|
||||||
|
static std::string const& getTildes() {
|
||||||
|
static const std::string dots( CATCH_CONFIG_CONSOLE_WIDTH-1, '~' );
|
||||||
|
return dots;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_headerPrinted;
|
bool m_headerPrinted;
|
||||||
|
Loading…
Reference in New Issue
Block a user