diff options
| author | Phil Nash | 2014-12-15 07:25:34 +0000 |
|---|---|---|
| committer | Phil Nash | 2014-12-15 07:25:34 +0000 |
| commit | 0dd214f6dbed7da03ff8d80071af3a39d1031754 (patch) | |
| tree | ba983e7ebfb2718ac43f022a03659c7c7b4e9281 /include | |
| parent | 6725e09003c0544389c12af5cba49df81554f468 (diff) | |
| download | catch3-0dd214f6dbed7da03ff8d80071af3a39d1031754.tar.gz | |
tags with . prefix are all hidden
Diffstat (limited to 'include')
| -rw-r--r-- | include/internal/catch_test_case_info.hpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/internal/catch_test_case_info.hpp b/include/internal/catch_test_case_info.hpp index 251b44c8..67f32b6e 100644 --- a/include/internal/catch_test_case_info.hpp +++ b/include/internal/catch_test_case_info.hpp @@ -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; |