MCPcopy Create free account
hub / github.com/apache/thrift / addPattern

Method addPattern

compiler/cpp/tests/catch/catch.hpp:3766–3783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3764 std::string subString() const { return m_arg.substr( m_start, m_pos - m_start ); }
3765 template<typename T>
3766 void addPattern() {
3767 std::string token = subString();
3768 for( size_t i = 0; i < m_escapeChars.size(); ++i )
3769 token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 );
3770 m_escapeChars.clear();
3771 if( startsWith( token, "exclude:" ) ) {
3772 m_exclusion = true;
3773 token = token.substr( 8 );
3774 }
3775 if( !token.empty() ) {
3776 Ptr<TestSpec::Pattern> pattern = new T( token );
3777 if( m_exclusion )
3778 pattern = new TestSpec::ExcludedPattern( pattern );
3779 m_currentFilter.m_patterns.push_back( pattern );
3780 }
3781 m_exclusion = false;
3782 m_mode = None;
3783 }
3784 void addFilter() {
3785 if( !m_currentFilter.m_patterns.empty() ) {
3786 m_testSpec.m_filters.push_back( m_currentFilter );

Callers

nothing calls this directly

Calls 5

startsWithFunction · 0.85
emptyMethod · 0.80
clearMethod · 0.65
sizeMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected