From 8f6d6a4a2daa7f7157dda2032e39bdd30dabe58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sun, 27 Aug 2017 16:45:53 +0200 Subject: [PATCH] Remove legacy [hide] tag Also removed even legacier "./" prefix for test case name... --- docs/test-cases-and-sections.md | 2 +- include/internal/catch_test_case_info.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/test-cases-and-sections.md b/docs/test-cases-and-sections.md index 7d26226e..56600759 100644 --- a/docs/test-cases-and-sections.md +++ b/docs/test-cases-and-sections.md @@ -35,7 +35,7 @@ Tag names are not case sensitive and can contain any ASCII characters. This mean All tag names beginning with non-alphanumeric characters are reserved by Catch. Catch defines a number of "special" tags, which have meaning to the test runner itself. These special tags all begin with a symbol character. Following is a list of currently defined special tags and their meanings. -* `[!hide]` or `[.]` (or, for legacy reasons, `[hide]`) - causes test cases to be skipped from the default list (i.e. when no test cases have been explicitly selected through tag expressions or name wildcards). The hide tag is often combined with another, user, tag (for example `[.][integration]` - so all integration tests are excluded from the default run but can be run by passing `[integration]` on the command line). As a short-cut you can combine these by simply prefixing your user tag with a `.` - e.g. `[.integration]`. Because the hide tag has evolved to have several forms, all forms are added as tags if you use one of them. +* `[!hide]` or `[.]` - causes test cases to be skipped from the default list (i.e. when no test cases have been explicitly selected through tag expressions or name wildcards). The hide tag is often combined with another, user, tag (for example `[.][integration]` - so all integration tests are excluded from the default run but can be run by passing `[integration]` on the command line). As a short-cut you can combine these by simply prefixing your user tag with a `.` - e.g. `[.integration]`. Because the hide tag has evolved to have several forms, all forms are added as tags if you use one of them. * `[!throws]` - lets Catch know that this test is likely to throw an exception even if successful. This causes the test to be excluded when running with `-e` or `--nothrow`. diff --git a/include/internal/catch_test_case_info.cpp b/include/internal/catch_test_case_info.cpp index a811f1df..d97b5996 100644 --- a/include/internal/catch_test_case_info.cpp +++ b/include/internal/catch_test_case_info.cpp @@ -20,7 +20,6 @@ namespace Catch { TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) { if( startsWith( tag, '.' ) || - tag == "hide" || tag == "!hide" ) return TestCaseInfo::IsHidden; else if( tag == "!throws" ) @@ -52,7 +51,7 @@ namespace Catch { std::string const& _descOrTags, SourceLineInfo const& _lineInfo ) { - bool isHidden( startsWith( _name, "./" ) ); // Legacy support + bool isHidden = false; // Parse out tags std::vector tags; @@ -83,7 +82,6 @@ namespace Catch { } } if( isHidden ) { - tags.push_back( "hide" ); tags.push_back( "." ); }