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

Support [.] as alias for [hide]

Commit
9c39a5e8dd4b071b9287c70949f6f7e1e0309146
Author
Phil Nash ·
Parents
235204393a45

Files · Download .tar.gz

Changes

 include/internal/catch_test_case_info.hpp | 2 +-
 projects/SelfTest/MessageTests.cpp        | 4 ++--
 projects/SelfTest/MiscTests.cpp           | 4 ++--
 projects/SelfTest/TestMain.cpp            | 8 ++++----
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/internal/catch_test_case_info.hpp b/include/internal/catch_test_case_info.hpp
index d3a2719b..99f05efe 100644
--- a/include/internal/catch_test_case_info.hpp
+++ b/include/internal/catch_test_case_info.hpp
@@ -25,7 +25,7 @@ namespace Catch {
         bool isHidden( startsWith( _name, "./" ) );
         std::set<std::string> tags;
         TagExtracter( tags ).parse( desc );
-        if( tags.find( "hide" ) != tags.end() )
+        if( tags.find( "hide" ) != tags.end() || tags.find( "." ) != tags.end() )
             isHidden = true;
 
         TestCaseInfo info( _name, _className, desc, tags, isHidden, _lineInfo );
diff --git a/projects/SelfTest/MessageTests.cpp b/projects/SelfTest/MessageTests.cpp
index c5647ff0..33f14ce2 100644
--- a/projects/SelfTest/MessageTests.cpp
+++ b/projects/SelfTest/MessageTests.cpp
@@ -92,11 +92,11 @@ TEST_CASE( "./succeeding/nofail", "The NO_FAIL macro reports a failure but does
     CHECK_NOFAIL( 1 == 2 );
 }
 
-TEST_CASE( "just info", "[info][isolated info][hide]" )
+TEST_CASE( "just info", "[info][isolated info][.]" )
 {
     INFO( "this should never be seen" );
 }
-TEST_CASE( "just failure", "[fail][isolated info][hide]" )
+TEST_CASE( "just failure", "[fail][isolated info][.]" )
 {
     FAIL( "Previous info should not be seen" );
 }
diff --git a/projects/SelfTest/MiscTests.cpp b/projects/SelfTest/MiscTests.cpp
index f8bdcbc3..f937e06c 100644
--- a/projects/SelfTest/MiscTests.cpp
+++ b/projects/SelfTest/MiscTests.cpp
@@ -272,7 +272,7 @@ TEST_CASE( "empty", "An empty test with no assertions" )
 {
 }
 
-TEST_CASE( "Nice descriptive name", "[tag1][tag2][tag3][hide]" )
+TEST_CASE( "Nice descriptive name", "[tag1][tag2][tag3][.]" )
 {
     WARN( "This one ran" );
 }
@@ -283,7 +283,7 @@ TEST_CASE( "second tag", "[tag2]" )
 {
 }
 //
-//TEST_CASE( "spawn a new process", "[hide]" )
+//TEST_CASE( "spawn a new process", "[.]" )
 //{
 //    // !TBD Work in progress
 //    char line[200];
diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp
index ab1b9934..00052465 100644
--- a/projects/SelfTest/TestMain.cpp
+++ b/projects/SelfTest/TestMain.cpp
@@ -305,7 +305,7 @@ TEST_CASE( "selftest/tags", "" ) {
     std::string p2 = "[one],[two]";
     std::string p3 = "[one][two]";
     std::string p4 = "[one][two],[three]";
-    std::string p5 = "[one][two]~[hide],[three]";
+    std::string p5 = "[one][two]~[.],[three]";
     
     SECTION( "one tag", "" ) {
         Catch::TestCase oneTag = makeTestCase( NULL, "", "test", "[one]", CATCH_INTERNAL_LINEINFO );
@@ -357,13 +357,13 @@ TEST_CASE( "selftest/tags", "" ) {
     }
 
     SECTION( "hidden", "" ) {
-        Catch::TestCase oneTag = makeTestCase( NULL, "", "test", "[hide]", CATCH_INTERNAL_LINEINFO );
+        Catch::TestCase oneTag = makeTestCase( NULL, "", "test", "[.]", CATCH_INTERNAL_LINEINFO );
 
         CHECK( oneTag.getTestCaseInfo().description == "" );
-        CHECK( oneTag.hasTag( "hide" ) );
+        CHECK( oneTag.hasTag( "." ) );
         CHECK( oneTag.isHidden() );
 
-        CHECK( oneTag.matchesTags( "~[hide]" ) == false );
+        CHECK( oneTag.matchesTags( "~[.]" ) == false );
 
     }
 }