summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/experimental/filesystem/class.path/path.nonmember
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-03-26 05:46:57 +0000
committerEric Fiselier <eric@efcs.ca>2018-03-26 05:46:57 +0000
commit19aae8fe2f2a5dfaaa7b6f2631f3f86801fc832d (patch)
treea27358ca3b9ff71131d520763aa4cf86cb934efb /libcxx/test/std/experimental/filesystem/class.path/path.nonmember
parent6f28d3c954e31c48d6c67950acc24380d92ea843 (diff)
downloadbcm5719-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.path/path.nonmember')
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.nonmember/append_op.pass.cpp3
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.factory.pass.cpp3
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.unicode_bug.pass.cpp2
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.nonmember/swap.pass.cpp3
5 files changed, 5 insertions, 8 deletions
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/append_op.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/append_op.pass.cpp
index 58983778446..3648da57af0 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/append_op.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/append_op.pass.cpp
@@ -13,14 +13,13 @@
// path operator/(path const&, path const&);
-#include <experimental/filesystem>
+#include "filesystem_include.hpp"
#include <type_traits>
#include <cassert>
#include "test_macros.h"
#include "filesystem_test_helper.hpp"
-namespace fs = std::experimental::filesystem;
// This is mainly tested via the member append functions.
int main()
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.factory.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.factory.pass.cpp
index 4853994b495..5d9194b4e8b 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.factory.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.factory.pass.cpp
@@ -16,7 +16,7 @@
// template <class InputIter>
// path u8path(InputIter, InputIter);
-#include <experimental/filesystem>
+#include "filesystem_include.hpp"
#include <type_traits>
#include <cassert>
@@ -25,7 +25,6 @@
#include "count_new.hpp"
#include "filesystem_test_helper.hpp"
-namespace fs = std::experimental::filesystem;
int main()
{
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp
index 8dd82a845f2..58e333aad6b 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp
@@ -22,7 +22,7 @@
// operator>>(basic_istream<charT, traits>& is, path& p)
//
-#include <experimental/filesystem>
+#include "filesystem_include.hpp"
#include <type_traits>
#include <sstream>
#include <cassert>
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.unicode_bug.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.unicode_bug.pass.cpp
index 3a9b48b2669..ff622532e8c 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.unicode_bug.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.unicode_bug.pass.cpp
@@ -27,7 +27,7 @@
// passes.
// XFAIL: *
-#include <experimental/filesystem>
+#include "filesystem_include.hpp"
#include <type_traits>
#include <sstream>
#include <cassert>
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/swap.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/swap.pass.cpp
index 8d180463a57..4f7b93a05a9 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/swap.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/swap.pass.cpp
@@ -13,7 +13,7 @@
// void swap(path& lhs, path& rhs) noexcept;
-#include <experimental/filesystem>
+#include "filesystem_include.hpp"
#include <type_traits>
#include <cassert>
@@ -21,7 +21,6 @@
#include "count_new.hpp"
#include "filesystem_test_helper.hpp"
-namespace fs = std::experimental::filesystem;
// NOTE: this is tested in path.members/path.modifiers via the member swap.
int main()
OpenPOWER on IntegriCloud