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

Make TagInfo non-local

Commit
d12c00666a814791ec7b038899acb287b8cab7eb
Author
Phil Nash ·
Parents
9241e436f96c

Files · Download .tar.gz

Changes

 include/internal/catch_list.hpp | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/include/internal/catch_list.hpp b/include/internal/catch_list.hpp
index 6a54f1c1..fb640da5 100644
--- a/include/internal/catch_list.hpp
+++ b/include/internal/catch_list.hpp
@@ -75,6 +75,24 @@ namespace Catch {
         return matchedTests;
     }
 
+    struct TagInfo {
+        TagInfo() : count ( 0 ) {}
+        void add( std::string const& spelling ) {
+            ++count;
+            spellings.insert( spelling );
+        }
+        std::string all() const {
+            std::string out;
+            for( std::set<std::string>::const_iterator it = spellings.begin(), itEnd = spellings.end();
+                        it != itEnd;
+                        ++it )
+                out += "[" + *it + "]";
+            return out;
+        }
+        std::set<std::string> spellings;
+        std::size_t count;
+    };
+
     inline std::size_t listTags( Config const& config ) {
         TestSpec testSpec = config.testSpec();
         if( config.testSpec().hasFilters() )
@@ -84,23 +102,6 @@ namespace Catch {
             testSpec = TestSpecParser().parse( "*" ).testSpec();
         }
 
-        struct TagInfo {
-            TagInfo() : count ( 0 ) {}
-            void add( std::string const& spelling ) {
-                ++count;
-                spellings.insert( spelling );
-            }
-            std::string all() const {
-                std::string out;
-                for( std::set<std::string>::const_iterator it = spellings.begin(), itEnd = spellings.end();
-                            it != itEnd;
-                            ++it )
-                    out += "[" + *it + "]";
-                return out;
-            }
-            std::set<std::string> spellings;
-            std::size_t count;
-        };
         std::map<std::string, TagInfo> tagCounts;
 
         std::vector<TestCase> matchedTestCases;