| 11326 | } |
| 11327 | |
| 11328 | std::string TagAliasRegistry::expandAliases( std::string const& unexpandedTestSpec ) const { |
| 11329 | std::string expandedTestSpec = unexpandedTestSpec; |
| 11330 | for( auto const& registryKvp : m_registry ) { |
| 11331 | std::size_t pos = expandedTestSpec.find( registryKvp.first ); |
| 11332 | if( pos != std::string::npos ) { |
| 11333 | expandedTestSpec = expandedTestSpec.substr( 0, pos ) + |
| 11334 | registryKvp.second.tag + |
| 11335 | expandedTestSpec.substr( pos + registryKvp.first.size() ); |
| 11336 | } |
| 11337 | } |
| 11338 | return expandedTestSpec; |
| 11339 | } |
| 11340 | |
| 11341 | void TagAliasRegistry::add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) { |
| 11342 | CATCH_ENFORCE( startsWith(alias, "[@") && endsWith(alias, ']'), |