MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / addPattern

Method addPattern

tests/catch.hpp:4294–4311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4292
4293 template<typename T>
4294 void addPattern() {
4295 std::string token = subString();
4296 for( std::size_t i = 0; i < m_escapeChars.size(); ++i )
4297 token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 );
4298 m_escapeChars.clear();
4299 if( startsWith( token, "exclude:" ) ) {
4300 m_exclusion = true;
4301 token = token.substr( 8 );
4302 }
4303 if( !token.empty() ) {
4304 TestSpec::PatternPtr pattern = std::make_shared<T>( token );
4305 if( m_exclusion )
4306 pattern = std::make_shared<TestSpec::ExcludedPattern>( pattern );
4307 m_currentFilter.m_patterns.push_back( pattern );
4308 }
4309 m_exclusion = false;
4310 m_mode = None;
4311 }
4312
4313 void addFilter();
4314 };

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected