| 9790 | } |
| 9791 | |
| 9792 | std::string TagAliasRegistry::expandAliases( std::string const& unexpandedTestSpec ) const { |
| 9793 | std::string expandedTestSpec = unexpandedTestSpec; |
| 9794 | for( auto const& registryKvp : m_registry ) { |
| 9795 | std::size_t pos = expandedTestSpec.find( registryKvp.first ); |
| 9796 | if( pos != std::string::npos ) { |
| 9797 | expandedTestSpec = expandedTestSpec.substr( 0, pos ) + |
| 9798 | registryKvp.second.tag + |
| 9799 | expandedTestSpec.substr( pos + registryKvp.first.size() ); |
| 9800 | } |
| 9801 | } |
| 9802 | return expandedTestSpec; |
| 9803 | } |
| 9804 | |
| 9805 | void TagAliasRegistry::add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) { |
| 9806 | CATCH_ENFORCE( startsWith(alias, "[@") && endsWith(alias, ']'), |