MCPcopy Create free account
hub / github.com/boostorg/filesystem / recursive_directory_iterator_tests

Function recursive_directory_iterator_tests

test/operations_test.cpp:617–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615 }
616
617 void recursive_directory_iterator_tests()
618 {
619 cout << "recursive_directory_iterator_tests..." << endl;
620 BOOST_TEST_EQ(walk_tree(false), 1);
621 if (create_symlink_ok)
622 BOOST_TEST(walk_tree(true) > 1);
623
624 // test iterator increment with error_code argument
625 cout << " with error_code argument" << endl;
626 boost::system::error_code ec;
627 int d1f1_count = 0;
628 for (fs::recursive_directory_iterator it (dir, fs::symlink_option::no_recurse);
629 it != fs::recursive_directory_iterator();
630 it.increment(ec))
631 {
632 if (it->path().filename() == "d1f1")
633 ++d1f1_count;
634 }
635 BOOST_TEST(!ec);
636 BOOST_TEST_EQ(d1f1_count, 1);
637
638 cout << " recursive_directory_iterator_tests complete" << endl;
639 }
640
641 // iterator_status_tests -----------------------------------------------------------//
642

Callers 1

cpp_mainFunction · 0.85

Calls 4

walk_treeFunction · 0.85
filenameMethod · 0.80
incrementMethod · 0.45

Tested by

no test coverage detected