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

Clean up generator state

Commit
c65aeaf25f63de7aa95dffef7fe8ddb7434cc5a9
Author
Phil Nash ·
Parents
750b52b81496

Files · Download .tar.gz

Changes

 include/internal/catch_context_impl.hpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/internal/catch_context_impl.hpp b/include/internal/catch_context_impl.hpp
index 030f29e2..8516ad93 100644
--- a/include/internal/catch_context_impl.hpp
+++ b/include/internal/catch_context_impl.hpp
@@ -12,6 +12,7 @@
 
 #include "catch_context.h"
 #include "catch_stream.hpp"
+#include "catch_common.h"
 
 namespace Catch {
 
@@ -21,6 +22,11 @@ namespace Catch {
         Context( Context const& );
         void operator=( Context const& );
 
+    public:
+        virtual ~Context() {
+            deleteAllValues( m_generatorsByTestName );
+        }
+
     public: // IContext
         virtual IResultCapture* getResultCapture() {
             return m_resultCapture;