Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Reformatted basic reporter signatures

Commit
f063c2ae2aec4fcbef9d105ada97eb5f9eb7b21d
Author
Phil Nash ·
Parents
4b162c134184

Files · Download .tar.gz

Changes

 catch_reporter_basic.hpp | 67 +++++++++++++++++++++++++++++++++++++++---------
 1 file 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";