MCPcopy Create free account
hub / github.com/apache/thrift / extractClassName

Function extractClassName

compiler/cpp/tests/catch/catch.hpp:7280–7291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7278 };
7279
7280 inline std::string extractClassName( std::string const& classOrQualifiedMethodName ) {
7281 std::string className = classOrQualifiedMethodName;
7282 if( startsWith( className, '&' ) )
7283 {
7284 std::size_t lastColons = className.rfind( "::" );
7285 std::size_t penultimateColons = className.rfind( "::", lastColons-1 );
7286 if( penultimateColons == std::string::npos )
7287 penultimateColons = 1;
7288 className = className.substr( penultimateColons, lastColons-penultimateColons );
7289 }
7290 return className;
7291 }
7292
7293 void registerTestCase
7294 ( ITestCase* testCase,

Callers 1

registerTestCaseFunction · 0.85

Calls 2

startsWithFunction · 0.85
substrMethod · 0.45

Tested by

no test coverage detected