MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / expandAliases

Method expandAliases

unittests/catch.hpp:9792–9803  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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, ']'),

Callers 1

catch.hppFile · 0.80

Calls 3

substrMethod · 0.80
findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected