| 100 | using PT = TestPathTree; |
| 101 | |
| 102 | std::string_view RemoveTrailingSlash(std::string_view key) { |
| 103 | while (!key.empty() && key.back() == '/') { |
| 104 | key.remove_suffix(1); |
| 105 | } |
| 106 | return key; |
| 107 | } |
| 108 | bool IsAncestorOf(std::string_view ancestor, std::string_view descendant) { |
| 109 | // See filesystem/path_util.h |
| 110 | ancestor = RemoveTrailingSlash(ancestor); |
no test coverage detected