| 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 ); |
nothing calls this directly
no test coverage detected