MCPcopy Create free account
hub / github.com/dblalock/bolt / addPattern

Method addPattern

cpp/quantize/catch.hpp:2908–2922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2906 std::string subString() const { return m_arg.substr( m_start, m_pos - m_start ); }
2907 template<typename T>
2908 void addPattern() {
2909 std::string token = subString();
2910 if( startsWith( token, "exclude:" ) ) {
2911 m_exclusion = true;
2912 token = token.substr( 8 );
2913 }
2914 if( !token.empty() ) {
2915 Ptr<TestSpec::Pattern> pattern = new T( token );
2916 if( m_exclusion )
2917 pattern = new TestSpec::ExcludedPattern( pattern );
2918 m_currentFilter.m_patterns.push_back( pattern );
2919 }
2920 m_exclusion = false;
2921 m_mode = None;
2922 }
2923 void addFilter() {
2924 if( !m_currentFilter.m_patterns.empty() ) {
2925 m_testSpec.m_filters.push_back( m_currentFilter );

Callers

nothing calls this directly

Calls 3

startsWithFunction · 0.70
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected