| 117 | } |
| 118 | |
| 119 | Forest MakeForest(std::vector<FileInfo>* infos) { |
| 120 | std::sort(infos->begin(), infos->end(), FileInfo::ByPath); |
| 121 | |
| 122 | return Forest(static_cast<int>(infos->size()), [&](int i, int j) { |
| 123 | return IsAncestorOf(infos->at(i).path, infos->at(j).path); |
| 124 | }); |
| 125 | } |
| 126 | |
| 127 | void ExpectForestIs(std::vector<FileInfo> infos, std::vector<PT> expected_roots) { |
| 128 | auto forest = MakeForest(&infos); |
no test coverage detected