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

Allow tests including catch to compile with g++ flags -Wall and -Werror.

Commit
9dfb8157a07c090b2db46d5c8a92b0a929b70e14
Author
Michael Mortensen ·
Parents
4aa36f607185

Files · Download .tar.gz

Changes

 catch_reporter_basic.hpp       |  4 +++-
 catch_reporter_junit.hpp       | 11 ++++++++---
 catch_reporter_xml.hpp         |  4 +++-
 internal/catch_commandline.hpp |  4 +++-
 4 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/catch_reporter_basic.hpp b/catch_reporter_basic.hpp
index 5331e6b7..427b4d01 100644
--- a/catch_reporter_basic.hpp
+++ b/catch_reporter_basic.hpp
@@ -142,6 +142,8 @@ namespace Catch
                 case ResultWas::ExplicitFailure:
                     m_config.stream() << "failed with message: '" << resultInfo.getMessage() << "'";
                     break;
+                default:
+                    break;
             }
             
             if( resultInfo.hasExpression() )
@@ -170,4 +172,4 @@ namespace Catch
     
 } // end namespace Catch
     
-#endif // TWOBLUECUBES_CATCH_REPORTER_BASIC_HPP_INCLUDED
\ No newline at end of file
+#endif // TWOBLUECUBES_CATCH_REPORTER_BASIC_HPP_INCLUDED
diff --git a/catch_reporter_junit.hpp b/catch_reporter_junit.hpp
index 09fb47c9..502c05fe 100644
--- a/catch_reporter_junit.hpp
+++ b/catch_reporter_junit.hpp
@@ -101,8 +101,13 @@ namespace Catch
             m_currentStats = &m_testSuiteStats;
         }
         
-        virtual void StartSection( const std::string& sectionName, const std::string description ){(sectionName,description);}
-        virtual void EndSection( const std::string& sectionName, std::size_t succeeded, std::size_t failed ){(sectionName, succeeded, failed);}
+        virtual void StartSection( const std::string& sectionName, const std::string description )
+        {
+        }
+
+        virtual void EndSection( const std::string& sectionName, std::size_t succeeded, std::size_t failed )
+        {
+        }
         
         ///////////////////////////////////////////////////////////////////////////
         virtual void StartTestCase( const Catch::TestCaseInfo& testInfo )
@@ -252,4 +257,4 @@ namespace Catch
     
 } // end namespace Catch
 
-#endif // TWOBLUECUBES_CATCH_REPORTER_JUNIT_HPP_INCLUDED
\ No newline at end of file
+#endif // TWOBLUECUBES_CATCH_REPORTER_JUNIT_HPP_INCLUDED
diff --git a/catch_reporter_xml.hpp b/catch_reporter_xml.hpp
index e641c21f..17704c26 100644
--- a/catch_reporter_xml.hpp
+++ b/catch_reporter_xml.hpp
@@ -130,6 +130,8 @@ namespace Catch
                         .writeText( resultInfo.getMessage() );
                     m_currentTestSuccess = false;
                     break;
+                default:
+                    break;
             }            
             if( resultInfo.hasExpression() )
                 m_xml.endElement();
@@ -150,4 +152,4 @@ namespace Catch
 
 } // end namespace Catch
 
-#endif // TWOBLUECUBES_CATCH_REPORTER_XML_HPP_INCLUDED
\ No newline at end of file
+#endif // TWOBLUECUBES_CATCH_REPORTER_XML_HPP_INCLUDED
diff --git a/internal/catch_commandline.hpp b/internal/catch_commandline.hpp
index f2865515..a6f4adab 100644
--- a/internal/catch_commandline.hpp
+++ b/internal/catch_commandline.hpp
@@ -157,6 +157,8 @@ namespace Catch
                         return setErrorMode( m_command + " does not accept arguments" );
                     m_config.setShouldDebugBreak( true );
                     break;
+            default:
+                break;
             }
             m_args.clear();
             m_mode = mode;
@@ -180,4 +182,4 @@ namespace Catch
     
 } // end namespace Catch
 
-#endif // TWOBLUECUBES_CATCH_COMMANDLINE_HPP_INCLUDED
\ No newline at end of file
+#endif // TWOBLUECUBES_CATCH_COMMANDLINE_HPP_INCLUDED