mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-31 00:47:56 +00:00
tags with . prefix are all hidden
This commit is contained in:
parent
6725e09003
commit
0dd214f6db
2 changed files with 9 additions and 8 deletions
|
@ -30,7 +30,7 @@ namespace Catch {
|
|||
return TestCaseInfo::None;
|
||||
}
|
||||
inline bool isReservedTag( std::string const& tag ) {
|
||||
return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !isalnum( tag[0] );
|
||||
return TestCaseInfo::None && tag.size() > 0 && !isalnum( tag[0] );
|
||||
}
|
||||
inline void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) {
|
||||
if( isReservedTag( tag ) ) {
|
||||
|
@ -70,14 +70,15 @@ namespace Catch {
|
|||
}
|
||||
else {
|
||||
if( c == ']' ) {
|
||||
enforceNotReservedTag( tag, _lineInfo );
|
||||
|
||||
inTag = false;
|
||||
if( tag == "hide" || tag == "." )
|
||||
TestCaseInfo::SpecialProperties prop = parseSpecialTag( tag );
|
||||
if( prop == TestCaseInfo::IsHidden )
|
||||
isHidden = true;
|
||||
else
|
||||
tags.insert( tag );
|
||||
else if( prop == TestCaseInfo::None )
|
||||
enforceNotReservedTag( tag, _lineInfo );
|
||||
|
||||
tags.insert( tag );
|
||||
tag.clear();
|
||||
inTag = false;
|
||||
}
|
||||
else
|
||||
tag += c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue