(root_prefix: &str)
| 2952 | } |
| 2953 | |
| 2954 | fn all_test_header_filenames(root_prefix: &str) -> HashSet<String> { |
| 2955 | let root = join_project_path(root_prefix, "tests"); |
| 2956 | let mut filenames = HashSet::new(); |
| 2957 | if !root.exists() { |
| 2958 | return filenames; |
| 2959 | } |
| 2960 | for entry in WalkDir::new(root).into_iter().filter_map(Result::ok) { |
| 2961 | if !entry.file_type().is_file() { |
| 2962 | continue; |
| 2963 | } |
| 2964 | let path = entry.path(); |
| 2965 | let path_str = normalize_path(&path_to_string(path)); |
| 2966 | if !ends_with_any(&path_str, &[".h", ".hpp", ".cpp.hpp"]) { |
| 2967 | continue; |
| 2968 | } |
| 2969 | if let Some(name) = path.file_name().and_then(|value| value.to_str()) { |
| 2970 | filenames.insert(name.to_string()); |
| 2971 | } |
| 2972 | } |
| 2973 | filenames |
| 2974 | } |
| 2975 | |
| 2976 | fn source_mirror_dir_has_headers(root_prefix: &str, test_dir_path: &str) -> bool { |
| 2977 | let src_dir = join_project_path(root_prefix, &format!("src/{test_dir_path}")); |
no test coverage detected