Some tidy up
This commit is contained in:
parent
68eec929e4
commit
de77ff3b29
@ -61,7 +61,6 @@ namespace Catch
|
||||
m_config.stream() << "[Testing completed. ";
|
||||
ReportCounts( succeeded, failed );
|
||||
m_config.stream() << "]" << std::endl;
|
||||
(succeeded, failed);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -156,10 +155,10 @@ namespace Catch
|
||||
virtual void EndTestCase( const TestCaseInfo& testInfo, const std::string& stdOut, const std::string& stdErr )
|
||||
{
|
||||
if( !stdOut.empty() )
|
||||
m_config.stream() << "[stdout: " << stdOut << "]\n";
|
||||
m_config.stream() << "[stdout: " << trim( stdOut ) << "]\n";
|
||||
|
||||
if( !stdErr.empty() )
|
||||
m_config.stream() << "[stderr: " << stdErr << "]\n";
|
||||
m_config.stream() << "[stderr: " << trim( stdErr ) << "]\n";
|
||||
|
||||
m_config.stream() << "[Finished: " << testInfo.getName() << "]" << std::endl;
|
||||
}
|
||||
|
@ -168,14 +168,6 @@ namespace Catch
|
||||
m_stdErr << stdErr << "\n";
|
||||
}
|
||||
|
||||
static std::string trim( const std::string& str )
|
||||
{
|
||||
std::string::size_type start = str.find_first_not_of( "\n\r\t " );
|
||||
std::string::size_type end = str.find_last_not_of( "\n\r\t " );
|
||||
|
||||
return start < end ? str.substr( start, 1+end-start ) : "";
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
virtual void EndTesting( std::size_t /* succeeded */, std::size_t /* failed */ )
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ namespace Catch
|
||||
|
||||
// create a T for use in sizeof expressions
|
||||
template<typename T> T Synth();
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
|
@ -22,6 +22,16 @@
|
||||
|
||||
namespace Catch
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
static std::string trim( const std::string& str )
|
||||
{
|
||||
std::string::size_type start = str.find_first_not_of( "\n\r\t " );
|
||||
std::string::size_type end = str.find_last_not_of( "\n\r\t " );
|
||||
|
||||
return start < end ? str.substr( start, 1+end-start ) : "";
|
||||
}
|
||||
|
||||
|
||||
class ReporterConfig
|
||||
{
|
||||
private:
|
||||
@ -167,7 +177,7 @@ namespace Catch
|
||||
{
|
||||
ReporterRegistry::instance().registerReporter<T>( name );
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#define CATCH_REGISTER_REPORTER( name, reporterType ) Catch::ReporterRegistrar<reporterType> INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ReporterReg )( name );
|
||||
|
Loading…
Reference in New Issue
Block a user