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

Added tags docs

Commit
20e59ce9d133b469798c4ce2a8d681c0d9b18975
Author
Phil Nash ·
Parents
b5b1b1e430c8

Files · Download .tar.gz

Changes

 include/internal/catch_commandline.hpp | 9 ++++++++-
 include/internal/catch_tags.hpp        | 4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/include/internal/catch_commandline.hpp b/include/internal/catch_commandline.hpp
index f03ae3c8..4df98531 100644
--- a/include/internal/catch_commandline.hpp
+++ b/include/internal/catch_commandline.hpp
@@ -282,7 +282,14 @@ namespace Catch {
             // subsequently wrapped lines
             virtual std::string optionDescription() const {
                 return
-                "!TBD";
+                "This option allows one or more tags or tag patterns to be specified.\n"
+                "Each tag is enclosed in square brackets. A series of tags form an AND expression "
+                "wheras a comma seperated sequence forms an OR expression. e.g.:\n\n"
+                "    -g [one][two],[three]\n\n"
+                "This matches all tests tagged [one] and [two], as well as all tests tagged [three].\n\n"
+                "Tags can be negated with the ~ character. This removes matching tests from the set. e.g.:\n\n"
+                "    -g [one]~[two]\n\n"
+                "matches all tests tagged [one], except those also tagged [two]";
             }
             
             virtual void parseIntoConfig( const Command& cmd, ConfigData& config ) {
diff --git a/include/internal/catch_tags.hpp b/include/internal/catch_tags.hpp
index 591ab5ad..510bff3c 100644
--- a/include/internal/catch_tags.hpp
+++ b/include/internal/catch_tags.hpp
@@ -83,12 +83,12 @@ namespace Catch {
     class Tag {
     public:
         Tag()
-        : m_isNegated( false )
+        :   m_isNegated( false )
         {}
 
         Tag( const std::string& name, bool isNegated )
         :   m_name( name ),
-        m_isNegated( isNegated )
+            m_isNegated( isNegated )
         {}
 
         std::string getName() const {