mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
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 */ )
|
||||
{
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user