1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: no-filesystem
11 // UNSUPPORTED: availability-filesystem-missing
15 // class recursive_directory_iterator
17 // void disable_recursion_pending();
19 #include "filesystem_include.h"
20 #include <type_traits>
24 #include "test_macros.h"
25 #include "filesystem_test_helper.h"
30 // NOTE: The main semantics of disable_recursion_pending are tested
31 // in the 'recursion_pending()' tests.
32 static void basic_test()
34 static_test_env static_env
;
35 recursive_directory_iterator
it(static_env
.Dir
);
36 assert(it
.recursion_pending() == true);
37 it
.disable_recursion_pending();
38 assert(it
.recursion_pending() == false);
39 it
.disable_recursion_pending();
40 assert(it
.recursion_pending() == false);
43 int main(int, char**) {