| 9782 | } |
| 9783 | |
| 9784 | TestCase makeTestCase(ITestInvoker *_testCase, std::string const &_className, NameAndTags const &nameAndTags, |
| 9785 | SourceLineInfo const &_lineInfo) { |
| 9786 | bool isHidden = false; |
| 9787 | |
| 9788 | // Parse out tags |
| 9789 | std::vector<std::string> tags; |
| 9790 | std::string desc, tag; |
| 9791 | bool inTag = false; |
| 9792 | std::string _descOrTags = nameAndTags.tags; |
| 9793 | for (char c : _descOrTags) { |
| 9794 | if (!inTag) { |
| 9795 | if (c == '[') |
| 9796 | inTag = true; |
| 9797 | else |
| 9798 | desc += c; |
| 9799 | } else { |
| 9800 | if (c == ']') { |
| 9801 | TestCaseInfo::SpecialProperties prop = parseSpecialTag(tag); |
| 9802 | if ((prop & TestCaseInfo::IsHidden) != 0) |
| 9803 | isHidden = true; |
| 9804 | else if (prop == TestCaseInfo::None) |
| 9805 | enforceNotReservedTag(tag, _lineInfo); |
| 9806 | |
| 9807 | tags.push_back(tag); |
| 9808 | tag.clear(); |
| 9809 | inTag = false; |
| 9810 | } else |
| 9811 | tag += c; |
| 9812 | } |
| 9813 | } |
| 9814 | if (isHidden) { |
| 9815 | tags.push_back("."); |
| 9816 | } |
| 9817 | |
| 9818 | TestCaseInfo info(nameAndTags.name, _className, desc, tags, _lineInfo); |
| 9819 | return TestCase(_testCase, std::move(info)); |
| 9820 | } |
| 9821 | |
| 9822 | void setTags(TestCaseInfo &testCaseInfo, std::vector<std::string> tags) { |
| 9823 | std::sort(begin(tags), end(tags)); |
no test coverage detected