MCPcopy Create free account
hub / github.com/cirquit/trdrop / addPattern

Method addPattern

ext/catch.hpp:3684–3701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3682 std::string subString() const { return m_arg.substr( m_start, m_pos - m_start ); }
3683 template<typename T>
3684 void addPattern() {
3685 std::string token = subString();
3686 for( size_t i = 0; i < m_escapeChars.size(); ++i )
3687 token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 );
3688 m_escapeChars.clear();
3689 if( startsWith( token, "exclude:" ) ) {
3690 m_exclusion = true;
3691 token = token.substr( 8 );
3692 }
3693 if( !token.empty() ) {
3694 Ptr<TestSpec::Pattern> pattern = new T( token );
3695 if( m_exclusion )
3696 pattern = new TestSpec::ExcludedPattern( pattern );
3697 m_currentFilter.m_patterns.push_back( pattern );
3698 }
3699 m_exclusion = false;
3700 m_mode = None;
3701 }
3702 void addFilter() {
3703 if( !m_currentFilter.m_patterns.empty() ) {
3704 m_testSpec.m_filters.push_back( m_currentFilter );

Callers

nothing calls this directly

Calls 3

startsWithFunction · 0.85
emptyMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected