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

Random bits of clean-up

Commit
4104fb735e4df1879b708abd93a5c5181435e58d
Author
Phil Nash ·
Parents
9e7e63c68712

Files · Download .tar.gz

Changes

 include/internal/catch_resultinfo.hpp       |  2 +-
 include/internal/catch_resultinfo_builder.h | 10 ++--------
 include/internal/catch_tags.hpp             |  8 --------
 projects/SelfTest/ConditionTests.cpp        |  8 --------
 projects/SelfTest/MiscTests.cpp             |  9 +++++++++
 5 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/include/internal/catch_resultinfo.hpp b/include/internal/catch_resultinfo.hpp
index 676f4e8f..8ad48ee5 100644
--- a/include/internal/catch_resultinfo.hpp
+++ b/include/internal/catch_resultinfo.hpp
@@ -40,7 +40,7 @@ namespace Catch {
         m_isNot( isNot )
         {
             if( isNot )
-                m_expr = "!" + m_expr;
+                m_expr = "!(" + m_expr + ")";
         }
 
     ResultInfo::~ResultInfo() {}
diff --git a/include/internal/catch_resultinfo_builder.h b/include/internal/catch_resultinfo_builder.h
index d236a884..37daf3ca 100644
--- a/include/internal/catch_resultinfo_builder.h
+++ b/include/internal/catch_resultinfo_builder.h
@@ -38,16 +38,10 @@ public:
     void setOp( const std::string& op );
     
     template<typename RhsT>
-    STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator ||
-    (
-        const RhsT&
-    );
+    STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( const RhsT& );
 
     template<typename RhsT>
-    STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator &&
-    (
-        const RhsT&
-    );
+    STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( const RhsT& );
     
 private:
     friend class ExpressionBuilder;
diff --git a/include/internal/catch_tags.hpp b/include/internal/catch_tags.hpp
index 566181c8..d6060022 100644
--- a/include/internal/catch_tags.hpp
+++ b/include/internal/catch_tags.hpp
@@ -112,14 +112,6 @@ namespace Catch {
             m_tags.insert( std::make_pair( tag.getName(), tag ) );
         }
 
-        // needed?
-        Tag find( const std::string& name ) const {
-            TagMap::const_iterator it = m_tags.find( name );
-            if( it == m_tags.end() )
-                return Tag();
-            else
-                return it->second;
-        }
         bool empty() const {
             return m_tags.empty();
         }
diff --git a/projects/SelfTest/ConditionTests.cpp b/projects/SelfTest/ConditionTests.cpp
index 17de55f7..49c22282 100644
--- a/projects/SelfTest/ConditionTests.cpp
+++ b/projects/SelfTest/ConditionTests.cpp
@@ -39,14 +39,6 @@ struct TestDef {
     
 };
 
-//TEST( "./succeeding/conditions/equality"  + Description("nyaya") )
-//{
-//    TEST_CASE( [Name("inner")] )
-//    {
-//        
-//    }
-//}
-
 // The "failing" tests all use the CHECK macro, which continues if the specific test fails.
 // This allows us to see all results, even if an earlier check fails
 
diff --git a/projects/SelfTest/MiscTests.cpp b/projects/SelfTest/MiscTests.cpp
index 5b102ffb..ca65d21a 100644
--- a/projects/SelfTest/MiscTests.cpp
+++ b/projects/SelfTest/MiscTests.cpp
@@ -304,3 +304,12 @@ TEST_CASE( "first tag", "[tag1]" )
 TEST_CASE( "second tag", "[tag2]" )
 {
 }
+
+TEST_CASE( "spawn a new process", "[hide]" )
+{
+    // !TBD Work in progress
+    char line[200];
+    FILE* output = popen("./CatchSelfTest ./failing/matchers/StartsWith", "r");
+    while ( fgets(line, 199, output) )
+        std::cout << line;
+}