Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhil Nash2011-01-14 08:30:17 +0000
committerPhil Nash2011-01-14 08:30:17 +0000
commitf063c2ae2aec4fcbef9d105ada97eb5f9eb7b21d (patch)
tree8401d3cb0afa632b158b755446ca9b71cd558a09
parent4b162c134184109b71a2f79f6c058de028f0a254 (diff)
downloadcatch3-f063c2ae2aec4fcbef9d105ada97eb5f9eb7b21d.tar.gz
Reformatted basic reporter signatures
-rw-r--r--catch_reporter_basic.hpp67
1 files changed, 55 insertions, 12 deletions
diff --git a/catch_reporter_basic.hpp b/catch_reporter_basic.hpp
index 582549da..f207334a 100644
--- a/catch_reporter_basic.hpp
+++ b/catch_reporter_basic.hpp
@@ -22,13 +22,17 @@ namespace Catch
{
public:
///////////////////////////////////////////////////////////////////////////
- BasicReporter( const IReporterConfig& config )
+ BasicReporter
+ (
+ const IReporterConfig& config
+ )
: m_config( config )
{
}
///////////////////////////////////////////////////////////////////////////
- static std::string getDescription()
+ static std::string getDescription
+ ()
{
return "Reports test results as lines of text";
}
@@ -36,7 +40,11 @@ namespace Catch
private:
///////////////////////////////////////////////////////////////////////////
- void ReportCounts( std::size_t succeeded, std::size_t failed )
+ void ReportCounts
+ (
+ std::size_t succeeded,
+ std::size_t failed
+ )
{
if( failed + succeeded == 0 )
m_config.stream() << "No tests ran";
@@ -51,13 +59,18 @@ namespace Catch
private: // IReporter
///////////////////////////////////////////////////////////////////////////
- virtual void StartTesting()
+ virtual void StartTesting
+ ()
{
m_config.stream() << "[Started testing]" << std::endl;
}
///////////////////////////////////////////////////////////////////////////
- virtual void EndTesting( std::size_t succeeded, std::size_t failed )
+ virtual void EndTesting
+ (
+ std::size_t succeeded,
+ std::size_t failed
+ )
{
m_config.stream() << "[Testing completed. ";
ReportCounts( succeeded, failed );
@@ -65,14 +78,22 @@ namespace Catch
}
///////////////////////////////////////////////////////////////////////////
- virtual void StartGroup( const std::string& groupName )
+ virtual void StartGroup
+ (
+ const std::string& groupName
+ )
{
if( !groupName.empty() )
m_config.stream() << "[Started group: '" << groupName << "']" << std::endl;
}
///////////////////////////////////////////////////////////////////////////
- virtual void EndGroup( const std::string& groupName, std::size_t succeeded, std::size_t failed )
+ virtual void EndGroup
+ (
+ const std::string& groupName,
+ std::size_t succeeded,
+ std::size_t failed
+ )
{
if( !groupName.empty() )
{
@@ -83,14 +104,21 @@ namespace Catch
}
///////////////////////////////////////////////////////////////////////////
- virtual void StartTestCase( const TestCaseInfo& testInfo )
+ virtual void StartTestCase
+ (
+ const TestCaseInfo& testInfo
+ )
{
m_config.stream() << std::endl << "[Running: " << testInfo.getName() << "]" << std::endl;
m_firstSectionInTestCase = true;
}
///////////////////////////////////////////////////////////////////////////
- virtual void StartSection( const std::string& sectionName, const std::string /*description*/ )
+ virtual void StartSection
+ (
+ const std::string& sectionName,
+ const std::string /*description*/
+ )
{
if( m_firstSectionInTestCase )
{
@@ -101,7 +129,12 @@ namespace Catch
}
///////////////////////////////////////////////////////////////////////////
- virtual void EndSection( const std::string& sectionName, std::size_t succeeded, std::size_t failed )
+ virtual void EndSection
+ (
+ const std::string& sectionName,
+ std::size_t succeeded,
+ std::size_t failed
+ )
{
m_config.stream() << "[End of section: '" << sectionName << "'. ";
ReportCounts( succeeded, failed );
@@ -109,7 +142,10 @@ namespace Catch
}
///////////////////////////////////////////////////////////////////////////
- virtual void Result( const ResultInfo& resultInfo )
+ virtual void Result
+ (
+ const ResultInfo& resultInfo
+ )
{
if( !m_config.includeSuccessfulResults() && resultInfo.getResultType() == ResultWas::Ok )
return;
@@ -155,7 +191,14 @@ namespace Catch
}
///////////////////////////////////////////////////////////////////////////
- virtual void EndTestCase( const TestCaseInfo& testInfo, std::size_t succeeded, std::size_t failed, const std::string& stdOut, const std::string& stdErr )
+ virtual void EndTestCase
+ (
+ const TestCaseInfo& testInfo,
+ std::size_t succeeded,
+ std::size_t failed,
+ const std::string& stdOut,
+ const std::string& stdErr
+ )
{
if( !stdOut.empty() )
m_config.stream() << "[stdout: " << trim( stdOut ) << "]\n";