MCPcopy Create free account
hub / github.com/catchorg/Catch2 / catch_path

Function catch_path

tools/misc/coverage-helper.cpp:71–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71std::string catch_path(std::string path) {
72 auto start = path.find("catch");
73 // try capitalized instead
74 if (start == std::string::npos) {
75 start = path.find("Catch");
76 }
77 if (start == std::string::npos) {
78 throw std::domain_error("Couldn't find Catch's base path");
79 }
80 auto end = path.find_first_of("\\/", start);
81 return path.substr(0, end);
82}
83
84std::string windowsify_path(std::string path) {
85 for (auto& c : path) {

Callers 1

mainFunction · 0.85

Calls 2

findMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected