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.path/path.member/path.construct | |
| 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.path/path.member/path.construct')
4 files changed, 4 insertions, 8 deletions
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/copy.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/copy.pass.cpp index 67b8a04049e..14b4b38c953 100644 --- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/copy.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/copy.pass.cpp @@ -15,13 +15,12 @@ // path(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.construct/default.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/default.pass.cpp index f26504616d5..fddeff98980 100644 --- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/default.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/default.pass.cpp @@ -15,13 +15,12 @@ // path() noexcept -#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.construct/move.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/move.pass.cpp index b8ac4b30700..16f89d0a21c 100644 --- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/move.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/move.pass.cpp @@ -15,14 +15,13 @@ // path(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.construct/source.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/source.pass.cpp index a04f35af578..e80ae45b83a 100644 --- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/source.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.construct/source.pass.cpp @@ -19,7 +19,7 @@ // path(InputIterator first, InputIterator last); -#include <experimental/filesystem> +#include "filesystem_include.hpp" #include <type_traits> #include <cassert> @@ -28,7 +28,6 @@ #include "min_allocator.h" #include "filesystem_test_helper.hpp" -namespace fs = std::experimental::filesystem; template <class CharT> void RunTestCase(MultiStringType const& MS) { |

