summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign
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.member/path.assign
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.member/path.assign')
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/braced_init.pass.cpp3
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/copy.pass.cpp3
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/move.pass.cpp3
-rw-r--r--libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp3
4 files changed, 4 insertions, 8 deletions
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/braced_init.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/braced_init.pass.cpp
index c5da52f6524..bbf331310b1 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/braced_init.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/braced_init.pass.cpp
@@ -15,14 +15,13 @@
// path& operator=(path const&);
-#include <experimental/filesystem>
+#include "filesystem_include.hpp"
#include <type_traits>
#include <cassert>
#include "test_macros.h"
#include "count_new.hpp"
-namespace fs = std::experimental::filesystem;
int main() {
using namespace fs;
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/copy.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/copy.pass.cpp
index 5c26f8464c1..8b54be6ed24 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/copy.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/copy.pass.cpp
@@ -15,13 +15,12 @@
// path& operator=(path const&);
-#include <experimental/filesystem>
+#include "filesystem_include.hpp"
#include <type_traits>
#include <cassert>
#include "test_macros.h"
-namespace fs = std::experimental::filesystem;
int main() {
using namespace fs;
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/move.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/move.pass.cpp
index 7263424ad25..c5cb37facfc 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/move.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/move.pass.cpp
@@ -15,14 +15,13 @@
// path& operator=(path&&) noexcept
-#include <experimental/filesystem>
+#include "filesystem_include.hpp"
#include <type_traits>
#include <cassert>
#include "test_macros.h"
#include "count_new.hpp"
-namespace fs = std::experimental::filesystem;
int main() {
using namespace fs;
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp
index 8c31ef51d94..2e064fa485f 100644
--- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp
@@ -22,7 +22,7 @@
// path& assign(InputIterator first, InputIterator last);
-#include <experimental/filesystem>
+#include "filesystem_include.hpp"
#include <type_traits>
#include <string_view>
#include <cassert>
@@ -33,7 +33,6 @@
#include "filesystem_test_helper.hpp"
#include <iostream>
-namespace fs = std::experimental::filesystem;
template <class CharT>
void RunTestCase(MultiStringType const& MS) {
OpenPOWER on IntegriCloud