MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / addPattern

Method addPattern

extlibs/catch/include/catch/catch.hpp:5037–5056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5035
5036 template<typename T>
5037 void addPattern() {
5038 std::string token = m_patternName;
5039 for( std::size_t i = 0; i < m_escapeChars.size(); ++i )
5040 token = token.substr( 0, m_escapeChars[i] - i ) + token.substr( m_escapeChars[i] -i +1 );
5041 m_escapeChars.clear();
5042 if( startsWith( token, "exclude:" ) ) {
5043 m_exclusion = true;
5044 token = token.substr( 8 );
5045 }
5046 if( !token.empty() ) {
5047 TestSpec::PatternPtr pattern = std::make_shared<T>( token, m_substring );
5048 if( m_exclusion )
5049 pattern = std::make_shared<TestSpec::ExcludedPattern>( pattern );
5050 m_currentFilter.m_patterns.push_back( pattern );
5051 }
5052 m_substring.clear();
5053 m_patternName.clear();
5054 m_exclusion = false;
5055 m_mode = None;
5056 }
5057
5058 void addFilter();
5059 };

Callers

nothing calls this directly

Calls 6

substrMethod · 0.80
startsWithFunction · 0.70
sizeMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected