MCPcopy Create free account
hub / github.com/bblanchon/ArduinoJson / addTagPattern

Method addTagPattern

extras/tests/catch/catch.hpp:14903–14928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14901 }
14902
14903 void TestSpecParser::addTagPattern() {
14904 auto token = preprocessPattern();
14905
14906 if (!token.empty()) {
14907 // If the tag pattern is the "hide and tag" shorthand (e.g. [.foo])
14908 // we have to create a separate hide tag and shorten the real one
14909 if (token.size() > 1 && token[0] == '.') {
14910 token.erase(token.begin());
14911 TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(".", m_substring);
14912 if (m_exclusion) {
14913 pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);
14914 }
14915 m_currentFilter.m_patterns.push_back(pattern);
14916 }
14917
14918 TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(token, m_substring);
14919
14920 if (m_exclusion) {
14921 pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);
14922 }
14923 m_currentFilter.m_patterns.push_back(pattern);
14924 }
14925 m_substring.clear();
14926 m_exclusion = false;
14927 m_mode = None;
14928 }
14929
14930 TestSpec parseTestSpec( std::string const& arg ) {
14931 return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected