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

Regen single include

Commit
70c5ef9eede41e7061ff1af45b5babe0d7cde4ba
Author
Phil Nash ·
Parents
4ea535e5059a

Files · Download .tar.gz

Changes

 single_include/catch.hpp | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/single_include/catch.hpp b/single_include/catch.hpp
index 26fec610..e7625571 100644
--- a/single_include/catch.hpp
+++ b/single_include/catch.hpp
@@ -1,5 +1,5 @@
 /*
- *  Generated: 2012-11-12 19:06:00.464911
+ *  Generated: 2012-11-13 21:45:42.830677
  *  ----------------------------------------------------------
  *  This file has been merged from multiple headers. Please don't edit it directly
  *  Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -643,6 +643,7 @@ inline std::string toString( std::nullptr_t ) {
 
 namespace Catch {
 
+    // ResultWas::OfType enum
     struct ResultWas { enum OfType {
         Unknown = -1,
         Ok = 0,
@@ -665,6 +666,7 @@ namespace Catch {
         return ( resultType & ResultWas::FailureBit ) == 0;
     }
 
+    // ResultAction::Value enum
     struct ResultAction { enum Value {
         None,
         Failed = 1, // Failure - but no debug break if Debug bit not set
@@ -672,26 +674,22 @@ namespace Catch {
         Abort = 4   // Test run should abort
     }; };
 
-    struct ResultDisposition {
-        enum Flags {
+    // ResultDisposition::Flags enum
+    struct ResultDisposition { enum Flags {
             Normal = 0x00,
 
-            ContinueOnFailure = 0x01,
-            NegateResult = 0x02,
-            SuppressFail = 0x04
-        };
-    };
+            ContinueOnFailure = 0x01,   // Failures fail test, but execution continues
+            NegateResult = 0x02,        // Prefix expressiom with !
+            SuppressFail = 0x04         // Failures are reported but do not fail the test
+    }; };
+
     inline ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ) {
         return static_cast<ResultDisposition::Flags>( static_cast<int>( lhs ) | static_cast<int>( rhs ) );
     }
 
-    inline bool testFlag( int flags, int bitOrBitsToTest ) { return ( flags & bitOrBitsToTest ) == bitOrBitsToTest; }
-    inline bool setFlag( int flags, int bitOrBitsToSet ) { return static_cast<ResultDisposition::Flags>( flags | bitOrBitsToSet ); }
-    inline bool resetFlag( int flags, int bitOrBitsToReset ) { return static_cast<ResultDisposition::Flags>( flags & ~bitOrBitsToReset ); }
-
-    inline bool shouldContinueOnFailure( int flags ) { return testFlag( flags, ResultDisposition::ContinueOnFailure ); }
-    inline bool shouldNegate( int flags ) { return testFlag( flags, ResultDisposition::NegateResult ); }
-    inline bool shouldSuppressFailure( int flags ) { return testFlag( flags, ResultDisposition::SuppressFail ); }
+    inline bool shouldContinueOnFailure( int flags ) { return flags & ResultDisposition::ContinueOnFailure; }
+    inline bool shouldNegate( int flags ) { return flags & ResultDisposition::NegateResult; }
+    inline bool shouldSuppressFailure( int flags ) { return flags & ResultDisposition::SuppressFail; }
 
 } // end namespace Catch