mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Small fixes and tweaks
This commit is contained in:
parent
355b5e546d
commit
fe1d7c1d08
@ -91,7 +91,7 @@ inline bool isTrue( bool value ){ return value; }
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
#define INTERNAL_CATCH_ACCEPT_INFO( expr, macroName, shouldNegate ) \
|
#define INTERNAL_CATCH_ACCEPT_INFO( expr, macroName, shouldNegate ) \
|
||||||
Catch::getResultCapture().acceptAssertionInfo( Catch::AssertionInfo( macroName, CATCH_INTERNAL_LINEINFO, #expr, shouldNegate ) );
|
Catch::getResultCapture().acceptAssertionInfo( Catch::AssertionInfo( macroName, CATCH_INTERNAL_LINEINFO, expr, shouldNegate ) );
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
#define INTERNAL_CATCH_TEST( expr, shouldNegate, stopOnFailure, macroName ) \
|
#define INTERNAL_CATCH_TEST( expr, shouldNegate, stopOnFailure, macroName ) \
|
||||||
|
@ -26,7 +26,7 @@ namespace Catch {
|
|||||||
ExpressionResultBuilder& ExpressionResultBuilder::operator=(const ExpressionResultBuilder& other ) {
|
ExpressionResultBuilder& ExpressionResultBuilder::operator=(const ExpressionResultBuilder& other ) {
|
||||||
m_data = other.m_data;
|
m_data = other.m_data;
|
||||||
m_exprComponents = other.m_exprComponents;
|
m_exprComponents = other.m_exprComponents;
|
||||||
m_stream.clear();
|
m_stream.str("");
|
||||||
m_stream << other.m_stream.str();
|
m_stream << other.m_stream.str();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ namespace Catch {
|
|||||||
streamVariableLengthText( "info", assertionResult.getMessage() );
|
streamVariableLengthText( "info", assertionResult.getMessage() );
|
||||||
break;
|
break;
|
||||||
case ResultWas::Warning:
|
case ResultWas::Warning:
|
||||||
m_config.stream << "warning:\n'" << assertionResult.getMessage() << "'";
|
streamVariableLengthText( "warning", assertionResult.getMessage() );
|
||||||
break;
|
break;
|
||||||
case ResultWas::ExplicitFailure:
|
case ResultWas::ExplicitFailure:
|
||||||
{
|
{
|
||||||
@ -309,7 +309,7 @@ namespace Catch {
|
|||||||
void streamVariableLengthText( const std::string& prefix, const std::string& text ) {
|
void streamVariableLengthText( const std::string& prefix, const std::string& text ) {
|
||||||
std::string trimmed = trim( text );
|
std::string trimmed = trim( text );
|
||||||
if( trimmed.find_first_of( "\r\n" ) == std::string::npos ) {
|
if( trimmed.find_first_of( "\r\n" ) == std::string::npos ) {
|
||||||
m_config.stream << "[" << prefix << ": " << trimmed << "]\n";
|
m_config.stream << "[" << prefix << ": " << trimmed << "]";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_config.stream << "\n[" << prefix << "] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n" << trimmed
|
m_config.stream << "\n[" << prefix << "] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n" << trimmed
|
||||||
|
Loading…
Reference in New Issue
Block a user