| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // UNSUPPORTED: c++03, c++11, c++14, c++17 |
| 10 | // UNSUPPORTED: no-filesystem |
| 11 | // UNSUPPORTED: availability-filesystem-missing |
| 12 | |
| 13 | // <filesystem> |
| 14 | |
| 15 | // class recursive_directory_iterator |
| 16 | |
| 17 | // bool operator==(default_sentinel_t) const noexcept { // since C++20 |
| 18 | // return *this == recursive_directory_iterator(); |
| 19 | // } |
| 20 | |
| 21 | #include <cassert> |
| 22 | #include <iterator> |
| 23 | |
| 24 | #include <filesystem> |
| 25 | #include "test_comparisons.h" |
| 26 | namespace fs = std::filesystem; |
| 27 | |
| 28 | int main(int, char**) { |
| 29 | AssertEqualityAreNoexcept<fs::recursive_directory_iterator>(); |
| 30 | AssertEqualityReturnBool<fs::recursive_directory_iterator>(); |
| 31 | |
| 32 | fs::recursive_directory_iterator i; |
| 33 | assert(testEquality(i, std::default_sentinel, true)); |
| 34 | |
| 35 | return 0; |
| 36 | } |
| 37 | |