Get the source directory of the current test file
| 49 | |
| 50 | // Get the source directory of the current test file |
| 51 | inline 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 |
| 59 | inline std::string join_path(const std::string& a, const std::string& b) { |
no test coverage detected