MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / addTagPattern

Method addTagPattern

deps/Catch/catch.hpp:14790–14815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14788 }
14789
14790 void TestSpecParser::addTagPattern() {
14791 auto token = preprocessPattern();
14792
14793 if (!token.empty()) {
14794 // If the tag pattern is the "hide and tag" shorthand (e.g. [.foo])
14795 // we have to create a separate hide tag and shorten the real one
14796 if (token.size() > 1 && token[0] == '.') {
14797 token.erase(token.begin());
14798 TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(".", m_substring);
14799 if (m_exclusion) {
14800 pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);
14801 }
14802 m_currentFilter.m_patterns.push_back(pattern);
14803 }
14804
14805 TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(token, m_substring);
14806
14807 if (m_exclusion) {
14808 pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);
14809 }
14810 m_currentFilter.m_patterns.push_back(pattern);
14811 }
14812 m_substring.clear();
14813 m_exclusion = false;
14814 m_mode = None;
14815 }
14816
14817 TestSpec parseTestSpec( std::string const& arg ) {
14818 return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();

Callers

nothing calls this directly

Calls 5

eraseMethod · 0.80
clearMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected