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

build 6

Commit
85b4e94192072e8e56b919ae52ffd91a80fd5dee
Author
Phil Nash ·
Parents
4b3fa4742b0b

Files · Download .tar.gz

Changes

 README.md                          |  2 +-
 include/internal/catch_version.hpp |  2 +-
 single_include/catch.hpp           | 25 +++++++++++++++++--------
 3 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md
index e675aae0..b122f69a 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 ![catch logo](catch-logo-small.png)
 
-*v1.1 build 5 (develop branch)*
+*v1.1 build 6 (develop branch)*
 
 Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)
 
diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp
index f9eccf43..1ca0c291 100644
--- a/include/internal/catch_version.hpp
+++ b/include/internal/catch_version.hpp
@@ -13,7 +13,7 @@
 namespace Catch {
 
     // These numbers are maintained by a script
-    Version libraryVersion( 1, 1, 5, "develop" );
+    Version libraryVersion( 1, 1, 6, "develop" );
 }
 
 #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
diff --git a/single_include/catch.hpp b/single_include/catch.hpp
index 97061340..cc47d626 100644
--- a/single_include/catch.hpp
+++ b/single_include/catch.hpp
@@ -1,6 +1,6 @@
 /*
- *  CATCH v1.1 build 5 (develop branch)
- *  Generated: 2014-09-18 18:24:52.876757
+ *  CATCH v1.1 build 6 (develop branch)
+ *  Generated: 2014-10-02 18:50:47.450525
  *  ----------------------------------------------------------
  *  This file has been merged from multiple headers. Please don't edit it directly
  *  Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -3819,7 +3819,7 @@ namespace Clara {
             m_throwOnUnrecognisedTokens( other.m_throwOnUnrecognisedTokens )
         {
             if( other.m_floatingArg.get() )
-                m_floatingArg = ArgAutoPtr( new Arg( *other.m_floatingArg ) );
+                m_floatingArg.reset( new Arg( *other.m_floatingArg ) );
         }
 
         CommandLine& setThrowOnUnrecognisedTokens( bool shouldThrow = true ) {
@@ -3847,7 +3847,7 @@ namespace Clara {
         ArgBuilder operator[]( UnpositionalTag ) {
             if( m_floatingArg.get() )
                 throw std::logic_error( "Only one unpositional argument can be added" );
-            m_floatingArg = ArgAutoPtr( new Arg() );
+            m_floatingArg.reset( new Arg() );
             ArgBuilder builder( m_floatingArg.get() );
             return builder;
         }
@@ -5054,14 +5054,22 @@ namespace Catch {
             fatal( "<unknown signal>", -sig );
         }
 
-        FatalConditionHandler() {
+        FatalConditionHandler() : m_isSet( true ) {
             for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i )
                 signal( signalDefs[i].id, handleSignal );
         }
         ~FatalConditionHandler() {
-            for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i )
-                signal( signalDefs[i].id, SIG_DFL );
+            reset();
+        }
+        void reset() {
+            if( m_isSet ) {
+                for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i )
+                    signal( signalDefs[i].id, SIG_DFL );
+                m_isSet = false;
+            }
         }
+
+        bool m_isSet;
     };
 
 } // namespace Catch
@@ -5341,6 +5349,7 @@ namespace Catch {
         void invokeActiveTestCase() {
             FatalConditionHandler fatalConditionHandler; // Handle signals
             m_activeTestCase->invoke();
+            fatalConditionHandler.reset();
         }
 
     private:
@@ -6640,7 +6649,7 @@ namespace Catch {
 namespace Catch {
 
     // These numbers are maintained by a script
-    Version libraryVersion( 1, 1, 5, "develop" );
+    Version libraryVersion( 1, 1, 6, "develop" );
 }
 
 // #included from: catch_message.hpp