MCPcopy Create free account
hub / github.com/FidoProject/Fido / addPattern

Method addPattern

tests/catch.h:3313–3327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3311 std::string subString() const { return m_arg.substr( m_start, m_pos - m_start ); }
3312 template<typename T>
3313 void addPattern() {
3314 std::string token = subString();
3315 if( startsWith( token, "exclude:" ) ) {
3316 m_exclusion = true;
3317 token = token.substr( 8 );
3318 }
3319 if( !token.empty() ) {
3320 Ptr<TestSpec::Pattern> pattern = new T( token );
3321 if( m_exclusion )
3322 pattern = new TestSpec::ExcludedPattern( pattern );
3323 m_currentFilter.m_patterns.push_back( pattern );
3324 }
3325 m_exclusion = false;
3326 m_mode = None;
3327 }
3328 void addFilter() {
3329 if( !m_currentFilter.m_patterns.empty() ) {
3330 m_testSpec.m_filters.push_back( m_currentFilter );

Callers

nothing calls this directly

Calls 2

startsWithFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected