diff options
author | Eric Fiselier <eric@efcs.ca> | 2018-03-26 05:46:57 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2018-03-26 05:46:57 +0000 |
commit | 19aae8fe2f2a5dfaaa7b6f2631f3f86801fc832d (patch) | |
tree | a27358ca3b9ff71131d520763aa4cf86cb934efb /libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp | |
parent | 6f28d3c954e31c48d6c67950acc24380d92ea843 (diff) | |
download | bcm5719-llvm-19aae8fe2f2a5dfaaa7b6f2631f3f86801fc832d.tar.gz bcm5719-llvm-19aae8fe2f2a5dfaaa7b6f2631f3f86801fc832d.zip |
Make filesystem tests generic between experimental and std versions.
As I move towards implementing std::filesystem, there is a need to
make the existing tests run against both the std and experimental versions.
Additionally, it's helpful to allow running the tests against other
implementations of filesystem.
This patch converts the test to easily target either. First, it
adds a filesystem_include.hpp header which is soley responsible
for selecting and including the correct implementation. Second,
it converts existing tests to use this header instead of including
filesystem directly.
llvm-svn: 328475
Diffstat (limited to 'libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp')
-rw-r--r-- | libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp b/libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp index 87c10c4998e..d2a5b8c18da 100644 --- a/libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp @@ -16,7 +16,7 @@ // recursive_directory_iterator& operator++(); // recursive_directory_iterator& increment(error_code& ec) noexcept; -#include <experimental/filesystem> +#include "filesystem_include.hpp" #include <type_traits> #include <set> #include <cassert> @@ -25,7 +25,7 @@ #include "rapid-cxx-test.hpp" #include "filesystem_test_helper.hpp" -using namespace std::experimental::filesystem; +using namespace fs; TEST_SUITE(recursive_directory_iterator_increment_tests) @@ -140,7 +140,7 @@ TEST_CASE(test_follow_symlinks) TEST_CASE(access_denied_on_recursion_test_case) { - using namespace std::experimental::filesystem; + using namespace fs; scoped_test_env env; const path testFiles[] = { env.create_dir("dir1"), @@ -239,7 +239,7 @@ TEST_CASE(access_denied_on_recursion_test_case) // See llvm.org/PR35078 TEST_CASE(test_PR35078) { - using namespace std::experimental::filesystem; + using namespace fs; scoped_test_env env; const path testFiles[] = { env.create_dir("dir1"), @@ -309,7 +309,7 @@ TEST_CASE(test_PR35078) // See llvm.org/PR35078 TEST_CASE(test_PR35078_with_symlink) { - using namespace std::experimental::filesystem; + using namespace fs; scoped_test_env env; const path testFiles[] = { env.create_dir("dir1"), @@ -393,7 +393,7 @@ TEST_CASE(test_PR35078_with_symlink) // See llvm.org/PR35078 TEST_CASE(test_PR35078_with_symlink_file) { - using namespace std::experimental::filesystem; + using namespace fs; scoped_test_env env; const path testFiles[] = { env.create_dir("dir1"), |