mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
Remove legacy [hide] tag
Also removed even legacier "./" prefix for test case name...
This commit is contained in:
parent
e8d3be3621
commit
8f6d6a4a2d
@ -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.
|
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`.
|
* `[!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`.
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ namespace Catch {
|
|||||||
|
|
||||||
TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) {
|
TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) {
|
||||||
if( startsWith( tag, '.' ) ||
|
if( startsWith( tag, '.' ) ||
|
||||||
tag == "hide" ||
|
|
||||||
tag == "!hide" )
|
tag == "!hide" )
|
||||||
return TestCaseInfo::IsHidden;
|
return TestCaseInfo::IsHidden;
|
||||||
else if( tag == "!throws" )
|
else if( tag == "!throws" )
|
||||||
@ -52,7 +51,7 @@ namespace Catch {
|
|||||||
std::string const& _descOrTags,
|
std::string const& _descOrTags,
|
||||||
SourceLineInfo const& _lineInfo )
|
SourceLineInfo const& _lineInfo )
|
||||||
{
|
{
|
||||||
bool isHidden( startsWith( _name, "./" ) ); // Legacy support
|
bool isHidden = false;
|
||||||
|
|
||||||
// Parse out tags
|
// Parse out tags
|
||||||
std::vector<std::string> tags;
|
std::vector<std::string> tags;
|
||||||
@ -83,7 +82,6 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( isHidden ) {
|
if( isHidden ) {
|
||||||
tags.push_back( "hide" );
|
|
||||||
tags.push_back( "." );
|
tags.push_back( "." );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user