(path: &str)
| 2894 | } |
| 2895 | |
| 2896 | fn tests_relative_path(path: &str) -> Option<String> { |
| 2897 | let normalized = normalize_path(path); |
| 2898 | if let Some(index) = normalized.find("/tests/") { |
| 2899 | return Some(normalized[index + "/tests/".len()..].to_string()); |
| 2900 | } |
| 2901 | normalized |
| 2902 | .strip_prefix("tests/") |
| 2903 | .map(|value| value.to_string()) |
| 2904 | } |
| 2905 | |
| 2906 | fn path_without_extension(path: &str) -> String { |
| 2907 | for suffix in [".cpp.hpp", ".cpp", ".hpp", ".h"] { |
no test coverage detected