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

Function source_dir

compiler/cpp/tests/cpp/t_cpp_generator_test_utils.h:51–56  ·  view source on GitHub ↗

Get the source directory of the current test file

Source from the content-addressed store, hash-verified

49
50// Get the source directory of the current test file
51inline std::string source_dir() {
52 std::string file = __FILE__;
53 std::replace(file.begin(), file.end(), '\\', '/');
54 size_t slash = file.rfind('/');
55 return (slash == std::string::npos) ? std::string(".") : file.substr(0, slash);
56}
57
58// Join two path components
59inline std::string join_path(const std::string& a, const std::string& b) {

Calls 4

stringFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected