diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst --- a/libcxx/docs/ReleaseNotes.rst +++ b/libcxx/docs/ReleaseNotes.rst @@ -67,6 +67,10 @@ in the specialization has not been implemented in libc++. This prevents the feature-test macro to be set. +- Platforms that don't have support for a filesystem can now still take advantage of some parts of ````. + Anything that does not rely on having an actual filesystem available will now work, such as ``std::filesystem::path``, + ``std::filesystem::perms`` and similar classes. + Deprecations and Removals ------------------------- diff --git a/libcxx/include/__filesystem/copy_options.h b/libcxx/include/__filesystem/copy_options.h --- a/libcxx/include/__filesystem/copy_options.h +++ b/libcxx/include/__filesystem/copy_options.h @@ -21,8 +21,6 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH - enum class _LIBCPP_ENUM_VIS copy_options : unsigned short { none = 0, skip_existing = 1, @@ -75,8 +73,6 @@ return __lhs = __lhs ^ __rhs; } -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP - _LIBCPP_END_NAMESPACE_FILESYSTEM #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__filesystem/directory_entry.h b/libcxx/include/__filesystem/directory_entry.h --- a/libcxx/include/__filesystem/directory_entry.h +++ b/libcxx/include/__filesystem/directory_entry.h @@ -35,13 +35,12 @@ _LIBCPP_PUSH_MACROS #include <__undef_macros> -#ifndef _LIBCPP_CXX03_LANG +#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH - class directory_entry { typedef _VSTD_FS::path _Path; @@ -520,7 +519,7 @@ _LIBCPP_END_NAMESPACE_FILESYSTEM -#endif // _LIBCPP_CXX03_LANG +#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) _LIBCPP_POP_MACROS diff --git a/libcxx/include/__filesystem/directory_iterator.h b/libcxx/include/__filesystem/directory_iterator.h --- a/libcxx/include/__filesystem/directory_iterator.h +++ b/libcxx/include/__filesystem/directory_iterator.h @@ -29,7 +29,7 @@ # pragma GCC system_header #endif -#ifndef _LIBCPP_CXX03_LANG +#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM @@ -164,6 +164,6 @@ #endif // _LIBCPP_STD_VER >= 20 -#endif // _LIBCPP_CXX03_LANG +#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) #endif // _LIBCPP___FILESYSTEM_DIRECTORY_ITERATOR_H diff --git a/libcxx/include/__filesystem/directory_options.h b/libcxx/include/__filesystem/directory_options.h --- a/libcxx/include/__filesystem/directory_options.h +++ b/libcxx/include/__filesystem/directory_options.h @@ -21,8 +21,6 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH - enum class _LIBCPP_ENUM_VIS directory_options : unsigned char { none = 0, follow_directory_symlink = 1, @@ -73,8 +71,6 @@ return __lhs = __lhs ^ __rhs; } -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP - _LIBCPP_END_NAMESPACE_FILESYSTEM #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__filesystem/file_status.h b/libcxx/include/__filesystem/file_status.h --- a/libcxx/include/__filesystem/file_status.h +++ b/libcxx/include/__filesystem/file_status.h @@ -23,8 +23,6 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH - class _LIBCPP_EXPORTED_FROM_ABI file_status { public: // constructors @@ -71,8 +69,6 @@ perms __prms_; }; -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP - _LIBCPP_END_NAMESPACE_FILESYSTEM #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__filesystem/filesystem_error.h b/libcxx/include/__filesystem/filesystem_error.h --- a/libcxx/include/__filesystem/filesystem_error.h +++ b/libcxx/include/__filesystem/filesystem_error.h @@ -70,22 +70,19 @@ shared_ptr<_Storage> __storage_; }; -// TODO(ldionne): We need to pop the pragma and push it again after -// filesystem_error to work around PR41078. -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH - # ifndef _LIBCPP_HAS_NO_EXCEPTIONS template -_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_filesystem_error(_Args&&... __args) { +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY void +__throw_filesystem_error(_Args&&... __args) { throw filesystem_error(_VSTD::forward<_Args>(__args)...); } # else template -_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_filesystem_error(_Args&&...) { +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY void +__throw_filesystem_error(_Args&&...) { _LIBCPP_VERBOSE_ABORT("filesystem_error was thrown in -fno-exceptions mode"); } # endif -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP _LIBCPP_END_NAMESPACE_FILESYSTEM diff --git a/libcxx/include/__filesystem/operations.h b/libcxx/include/__filesystem/operations.h --- a/libcxx/include/__filesystem/operations.h +++ b/libcxx/include/__filesystem/operations.h @@ -28,7 +28,7 @@ # pragma GCC system_header #endif -#ifndef _LIBCPP_CXX03_LANG +#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM @@ -196,6 +196,6 @@ _LIBCPP_END_NAMESPACE_FILESYSTEM -#endif // _LIBCPP_CXX03_LANG +#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) #endif // _LIBCPP___FILESYSTEM_OPERATIONS_H diff --git a/libcxx/include/__filesystem/path_iterator.h b/libcxx/include/__filesystem/path_iterator.h --- a/libcxx/include/__filesystem/path_iterator.h +++ b/libcxx/include/__filesystem/path_iterator.h @@ -27,8 +27,6 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH - class _LIBCPP_EXPORTED_FROM_ABI path::iterator { public: enum _ParserState : unsigned char { @@ -114,19 +112,19 @@ _ParserState __state_; }; +_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY inline _LIBCPP_INLINE_VISIBILITY bool operator==(const path::iterator& __lhs, const path::iterator& __rhs) { return __lhs.__path_ptr_ == __rhs.__path_ptr_ && __lhs.__entry_.data() == __rhs.__entry_.data(); } +_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const path::iterator& __lhs, const path::iterator& __rhs) { return !(__lhs == __rhs); } -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP - _LIBCPP_END_NAMESPACE_FILESYSTEM #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__filesystem/perm_options.h b/libcxx/include/__filesystem/perm_options.h --- a/libcxx/include/__filesystem/perm_options.h +++ b/libcxx/include/__filesystem/perm_options.h @@ -21,8 +21,6 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH - enum class _LIBCPP_ENUM_VIS perm_options : unsigned char { replace = 1, add = 2, @@ -68,8 +66,6 @@ return __lhs = __lhs ^ __rhs; } -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP - _LIBCPP_END_NAMESPACE_FILESYSTEM #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__filesystem/perms.h b/libcxx/include/__filesystem/perms.h --- a/libcxx/include/__filesystem/perms.h +++ b/libcxx/include/__filesystem/perms.h @@ -21,8 +21,6 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH - // On Windows, these permission bits map to one single readonly flag per // file, and the executable bit is always returned as set. When setting // permissions, as long as the write bit is set for either owner, group or @@ -86,8 +84,6 @@ _LIBCPP_INLINE_VISIBILITY inline perms& operator^=(perms& __lhs, perms __rhs) { return __lhs = __lhs ^ __rhs; } -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP - _LIBCPP_END_NAMESPACE_FILESYSTEM #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__filesystem/recursive_directory_iterator.h b/libcxx/include/__filesystem/recursive_directory_iterator.h --- a/libcxx/include/__filesystem/recursive_directory_iterator.h +++ b/libcxx/include/__filesystem/recursive_directory_iterator.h @@ -28,7 +28,7 @@ # pragma GCC system_header #endif -#ifndef _LIBCPP_CXX03_LANG +#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM @@ -178,6 +178,6 @@ #endif // _LIBCPP_STD_VER >= 20 -#endif // _LIBCPP_CXX03_LANG +#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) #endif // _LIBCPP___FILESYSTEM_RECURSIVE_DIRECTORY_ITERATOR_H diff --git a/libcxx/include/__filesystem/space_info.h b/libcxx/include/__filesystem/space_info.h --- a/libcxx/include/__filesystem/space_info.h +++ b/libcxx/include/__filesystem/space_info.h @@ -22,8 +22,6 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH - struct _LIBCPP_EXPORTED_FROM_ABI space_info { uintmax_t capacity; uintmax_t free; @@ -34,8 +32,6 @@ # endif }; -_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP - _LIBCPP_END_NAMESPACE_FILESYSTEM #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -558,10 +558,6 @@ // [fs.filesystem.syn] #include -#if defined(_LIBCPP_HAS_NO_FILESYSTEM) -# error "The library is not supported since libc++ has been configured without support for a filesystem." -#endif - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/fstream b/libcxx/include/fstream --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -189,15 +189,12 @@ #include <__utility/swap.h> #include <__utility/unreachable.h> #include +#include #include #include #include #include -#if !defined(_LIBCPP_HAS_NO_FILESYSTEM) -# include -#endif - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap.in --- a/libcxx/include/module.modulemap.in +++ b/libcxx/include/module.modulemap.in @@ -911,6 +911,7 @@ private header "__filesystem/path.h" export functional.__functional.hash export functional.__functional.unary_function + export string } module path_iterator { private header "__filesystem/path_iterator.h" } module perm_options { private header "__filesystem/perm_options.h" } diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt @@ -12,6 +12,10 @@ condition_variable.cpp condition_variable_destructor.cpp exception.cpp + filesystem/filesystem_clock.cpp + filesystem/filesystem_error.cpp + filesystem/path_parser.h + filesystem/path.cpp functional.cpp future.cpp hash.cpp @@ -113,11 +117,7 @@ filesystem/directory_entry.cpp filesystem/directory_iterator.cpp filesystem/file_descriptor.h - filesystem/filesystem_clock.cpp - filesystem/filesystem_error.cpp filesystem/operations.cpp - filesystem/path_parser.h - filesystem/path.cpp filesystem/posix_compat.h filesystem/time_utils.h ) diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp --- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp +++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp @@ -5,6 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// + // // template > diff --git a/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp --- a/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing +// UNSUPPORTED: no-filesystem // ADDITIONAL_COMPILE_FLAGS: -I %S/../../../../../../src // This test relies on calling functions from the libcxx internal headers diff --git a/libcxx/test/libcxx/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp --- a/libcxx/test/libcxx/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // These tests require locale for non-char paths // UNSUPPORTED: no-localization @@ -24,11 +25,11 @@ #include #include -#include "test_macros.h" -#include "test_iterators.h" #include "count_new.h" +#include "make_string.h" #include "min_allocator.h" -#include "filesystem_test_helper.h" +#include "test_iterators.h" +#include "test_macros.h" // the SSO is always triggered for strings of size 2. diff --git a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp --- a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/libcxx/input.output/filesystems/lit.local.cfg b/libcxx/test/libcxx/input.output/filesystems/lit.local.cfg deleted file mode 100644 --- a/libcxx/test/libcxx/input.output/filesystems/lit.local.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Load the same local configuration as the filesystem tests in libcxx/test/std -import os - -std_filesystem_tests = os.path.join( - config.test_source_root, "std", "input.output", "filesystems" -) -config.load_from_path(os.path.join(std_filesystem_tests, "lit.local.cfg"), lit_config) diff --git a/libcxx/test/libcxx/transitive_includes.gen.py b/libcxx/test/libcxx/transitive_includes.gen.py --- a/libcxx/test/libcxx/transitive_includes.gen.py +++ b/libcxx/test/libcxx/transitive_includes.gen.py @@ -63,8 +63,8 @@ //--- {header}.sh.cpp {lit_header_restrictions.get(header, '')} -// TODO: Fix this test to make it work with filesystem, localization or wide characters disabled -// UNSUPPORTED{BLOCKLIT}: no-filesystem, no-localization, no-wide-characters +// TODO: Fix this test to make it work with localization or wide characters disabled +// UNSUPPORTED{BLOCKLIT}: no-localization, no-wide-characters // When built with modules, this test doesn't work because --trace-includes doesn't // report the stack of includes correctly. diff --git a/libcxx/test/std/containers/iterator.rel_ops.compile.pass.cpp b/libcxx/test/std/containers/iterator.rel_ops.compile.pass.cpp --- a/libcxx/test/std/containers/iterator.rel_ops.compile.pass.cpp +++ b/libcxx/test/std/containers/iterator.rel_ops.compile.pass.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: no-filesystem // XFAIL: availability-filesystem-missing // Make sure the various containers' iterators are not broken by the use of `std::rel_ops`. @@ -15,6 +14,7 @@ #include #include +#include #include #include #include @@ -26,10 +26,6 @@ #include "test_macros.h" -#if TEST_STD_VER >= 11 -#include "filesystem_include.h" -#endif - #if TEST_STD_VER >= 17 #include #endif @@ -115,16 +111,18 @@ template void test_forward >(); template void test_random_access >(); -#if TEST_STD_VER >= 11 +#if TEST_STD_VER >= 17 void test_directory_iterators() { - fs::directory_iterator it; +#ifndef TEST_HAS_NO_FILESYSTEM + std::filesystem::directory_iterator it; test_eq(it, it); - fs::recursive_directory_iterator rdit; + std::filesystem::recursive_directory_iterator rdit; test_eq(rdit, rdit); +#endif } -template void test_forward(); +template void test_forward(); #endif #if TEST_STD_VER >= 17 diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: no-filesystem // UNSUPPORTED: availability-filesystem-missing diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: no-filesystem // UNSUPPORTED: availability-filesystem-missing diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: no-filesystem // UNSUPPORTED: availability-filesystem-missing diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: no-filesystem // UNSUPPORTED: availability-filesystem-missing diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: no-filesystem // UNSUPPORTED: availability-filesystem-missing diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: no-filesystem // UNSUPPORTED: availability-filesystem-missing diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: no-filesystem // UNSUPPORTED: availability-filesystem-missing diff --git a/libcxx/test/std/input.output/filesystems/lit.local.cfg b/libcxx/test/std/input.output/filesystems/class.directory_entry/lit.local.cfg rename from libcxx/test/std/input.output/filesystems/lit.local.cfg rename to libcxx/test/std/input.output/filesystems/class.directory_entry/lit.local.cfg diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/equal.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/equal.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/equal.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/equal.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/iterator_concept_conformance.compile.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/iterator_concept_conformance.compile.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/iterator_concept_conformance.compile.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // directory_iterator, recursive_directory_iterator diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // directory_iterator diff --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp b/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: availability-filesystem-missing // UNSUPPORTED: c++03 // diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -24,7 +25,36 @@ #include #include "test_macros.h" -#include "filesystem_test_helper.h" + +template +bool checkCollectionsEqual( + Iter1 start1, Iter1 const end1 + , Iter2 start2, Iter2 const end2 + ) +{ + while (start1 != end1 && start2 != end2) { + if (*start1 != *start2) { + return false; + } + ++start1; ++start2; + } + return (start1 == end1 && start2 == end2); +} + +template +bool checkCollectionsEqualBackwards( + Iter1 const start1, Iter1 end1 + , Iter2 const start2, Iter2 end2 + ) +{ + while (start1 != end1 && start2 != end2) { + --end1; --end2; + if (*end1 != *end2) { + return false; + } + } + return (start1 == end1 && start2 == end2); +} void checkIteratorConcepts() { using namespace fs; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // These tests require locale for non-char paths // UNSUPPORTED: no-localization @@ -33,11 +34,11 @@ // to an intermediate path object, causing allocations in cases where no // allocations are done on other platforms. -#include "test_macros.h" -#include "test_iterators.h" +#include "../path_helper.h" #include "count_new.h" -#include "filesystem_test_helper.h" - +#include "make_string.h" +#include "test_iterators.h" +#include "test_macros.h" struct AppendOperatorTestcase { MultiStringType lhs; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // These tests require locale for non-char paths // UNSUPPORTED: no-localization @@ -32,10 +33,11 @@ // On Windows, charset conversions cause allocations in the path class in // cases where no allocations are done on other platforms. -#include "test_macros.h" -#include "test_iterators.h" +#include "../../path_helper.h" #include "count_new.h" -#include "filesystem_test_helper.h" +#include "make_string.h" +#include "test_iterators.h" +#include "test_macros.h" template diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp @@ -8,6 +8,7 @@ // UNSUPPORTED: no-localization // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS // @@ -37,7 +38,10 @@ #include #include "test_macros.h" -#include "filesystem_test_helper.h" + +#ifdef _WIN32 +# include // SetFileApisToANSI & friends +#endif // Test conversion with strings that fit within the latin1 charset, that fit // within one code point in UTF-16, and that can be expressible in certain diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -28,15 +29,16 @@ // template<> struct hash; #include "filesystem_include.h" +#include +#include #include #include -#include -#include "test_macros.h" +#include "assert_macros.h" +#include "count_new.h" #include "test_comparisons.h" #include "test_iterators.h" -#include "count_new.h" -#include "filesystem_test_helper.h" +#include "test_macros.h" struct PathCompareTest { const char* LHS; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // These tests require locale for non-char paths // UNSUPPORTED: no-localization @@ -39,10 +40,11 @@ // On Windows, charset conversions cause allocations in the path class in // cases where no allocations are done on other platforms. -#include "test_macros.h" -#include "test_iterators.h" +#include "../path_helper.h" #include "count_new.h" -#include "filesystem_test_helper.h" +#include "make_string.h" +#include "test_iterators.h" +#include "test_macros.h" struct ConcatOperatorTestcase { diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // These tests require locale for non-char paths // UNSUPPORTED: no-localization @@ -25,10 +26,11 @@ #include #include -#include "test_macros.h" -#include "test_iterators.h" +#include "../../path_helper.h" +#include "make_string.h" #include "min_allocator.h" -#include "filesystem_test_helper.h" +#include "test_iterators.h" +#include "test_macros.h" template diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp @@ -13,6 +13,7 @@ // bool empty() const noexcept; // UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: availability-filesystem-missing #include "filesystem_include.h" diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -48,13 +49,13 @@ #include #include #include +#include #include #include #include "test_macros.h" #include "test_iterators.h" #include "count_new.h" -#include "filesystem_test_helper.h" struct ComparePathExact { bool operator()(fs::path const& LHS, std::string const& RHS) const { diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -18,9 +19,9 @@ #include #include -#include "test_macros.h" +#include "../../path_helper.h" #include "count_new.h" -#include "filesystem_test_helper.h" +#include "test_macros.h" int main(int, char**) { diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -19,10 +20,9 @@ #include #include -#include "test_macros.h" +#include "../../path_helper.h" #include "count_new.h" -#include "filesystem_test_helper.h" - +#include "test_macros.h" int main(int, char**) { // clang-format off diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // These tests require locale for non-char paths // UNSUPPORTED: no-localization @@ -21,17 +22,18 @@ // generic_string(const Allocator& a = Allocator()) const; #include "filesystem_include.h" -#include #include +#include +#include -#include "test_macros.h" -#include "test_iterators.h" #include "count_new.h" +#include "make_string.h" #include "min_allocator.h" -#include "filesystem_test_helper.h" +#include "test_iterators.h" +#include "test_macros.h" -MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/123456789/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); +MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/123456789/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); // generic_string forwards to string. Tests for // string() are in "path.native.obs/string_alloc.pass.cpp". diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // These tests require locale for non-char paths // UNSUPPORTED: no-localization @@ -23,14 +24,15 @@ #include "filesystem_include.h" -#include #include +#include +#include -#include "test_macros.h" -#include "test_iterators.h" #include "count_new.h" +#include "make_string.h" #include "min_allocator.h" -#include "filesystem_test_helper.h" +#include "test_iterators.h" +#include "test_macros.h" MultiStringType input = MKSTR("c:\\foo\\bar"); #ifdef _WIN32 diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -15,13 +16,12 @@ // void clear() noexcept #include "filesystem_include.h" -#include #include +#include -#include "test_macros.h" -#include "test_iterators.h" +#include "assert_macros.h" #include "count_new.h" -#include "filesystem_test_helper.h" +#include "test_iterators.h" int main(int, char**) { diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -15,13 +16,12 @@ // path& make_preferred() #include "filesystem_include.h" -#include #include +#include +#include -#include "test_macros.h" #include "test_iterators.h" #include "count_new.h" -#include "filesystem_test_helper.h" struct MakePreferredTestcase { diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -18,10 +19,8 @@ #include #include -#include "test_macros.h" #include "test_iterators.h" #include "count_new.h" -#include "filesystem_test_helper.h" struct RemoveFilenameTestcase { const char* value; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -15,13 +16,12 @@ // path& replace_extension(path const& p = path()) #include "filesystem_include.h" -#include #include +#include +#include -#include "test_macros.h" -#include "test_iterators.h" #include "count_new.h" -#include "filesystem_test_helper.h" +#include "test_iterators.h" struct ReplaceExtensionTestcase { diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -15,13 +16,12 @@ // path& replace_filename( const path& replacement ); #include "filesystem_include.h" -#include #include +#include +#include -#include "test_macros.h" #include "test_iterators.h" #include "count_new.h" -#include "filesystem_test_helper.h" struct ReplaceFilenameTestcase { const char* value; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -15,13 +16,12 @@ // void swap(path& rhs) noexcept; #include "filesystem_include.h" -#include #include +#include -#include "test_macros.h" -#include "test_iterators.h" +#include "assert_macros.h" #include "count_new.h" -#include "filesystem_test_helper.h" +#include "test_iterators.h" struct SwapTestcase { diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -16,16 +17,15 @@ // const value_type* c_str() const noexcept; #include "filesystem_include.h" -#include #include +#include +#include #include "assert_macros.h" #include "test_macros.h" -#include "filesystem_test_helper.h" -int main(int, char**) -{ +int main(int, char**) { using namespace fs; const char* const value = "hello world"; const std::string str_value = value; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // These tests require locale for non-char paths // UNSUPPORTED: no-localization @@ -23,14 +24,16 @@ #include "filesystem_include.h" -#include #include +#include +#include -#include "test_macros.h" -#include "test_iterators.h" +#include "assert_macros.h" #include "count_new.h" +#include "make_string.h" #include "min_allocator.h" -#include "filesystem_test_helper.h" +#include "test_iterators.h" +#include "test_macros.h" MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/123456789/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -15,15 +16,15 @@ // const string_type& native() const noexcept; #include "filesystem_include.h" -#include #include +#include +#include +#include "assert_macros.h" #include "test_macros.h" -#include "filesystem_test_helper.h" -int main(int, char**) -{ +int main(int, char**) { using namespace fs; const char* const value = "hello world"; std::string value_str(value); diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -16,15 +17,15 @@ // operator string_type() const; #include "filesystem_include.h" -#include #include +#include +#include +#include "assert_macros.h" #include "test_macros.h" -#include "filesystem_test_helper.h" -int main(int, char**) -{ +int main(int, char**) { using namespace fs; using string_type = path::string_type; const char* const value = "hello world"; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -17,11 +18,9 @@ #include #include "test_macros.h" -#include "filesystem_test_helper.h" // This is mainly tested via the member append functions. -int main(int, char**) -{ +int main(int, char**) { using namespace fs; path p1("abc"); path p2("def"); diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp @@ -7,10 +7,10 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // - #include "filesystem_include.h" using namespace fs; diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp @@ -8,6 +8,7 @@ // UNSUPPORTED: c++03 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS +// UNSUPPORTED: availability-filesystem-missing // @@ -17,13 +18,13 @@ // path u8path(InputIter, InputIter); #include "filesystem_include.h" -#include #include +#include +#include #include "test_macros.h" #include "test_iterators.h" #include "count_new.h" -#include "filesystem_test_helper.h" int main(int, char**) diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp @@ -8,6 +8,7 @@ // UNSUPPORTED: c++03 // UNSUPPORTED: no-localization +// UNSUPPORTED: availability-filesystem-missing // @@ -28,10 +29,10 @@ #include #include -#include "test_macros.h" -#include "test_iterators.h" #include "count_new.h" -#include "filesystem_test_helper.h" +#include "make_string.h" +#include "test_iterators.h" +#include "test_macros.h" MultiStringType InStr = MKSTR("abcdefg/\"hijklmnop\"/qrstuvwxyz/123456789"); MultiStringType OutStr = MKSTR("\"abcdefg/\\\"hijklmnop\\\"/qrstuvwxyz/123456789\""); diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // @@ -18,7 +19,6 @@ #include "test_macros.h" #include "count_new.h" -#include "filesystem_test_helper.h" // NOTE: this is tested in path.members/path.modifiers via the member swap. int main(int, char**) diff --git a/libcxx/test/std/input.output/filesystems/class.path/path_helper.h b/libcxx/test/std/input.output/filesystems/class.path/path_helper.h new file mode 100644 --- /dev/null +++ b/libcxx/test/std/input.output/filesystems/class.path/path_helper.h @@ -0,0 +1,101 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef TEST_STD_INPUT_OUTPUT_FILESYSTEMS_CLASS_PATH_PATH_HELPER_H +#define TEST_STD_INPUT_OUTPUT_FILESYSTEMS_CLASS_PATH_PATH_HELPER_H + +#include +#include + +#include "filesystem_include.h" +#include "make_string.h" + +// Testing the allocation behavior of the code_cvt functions requires +// *knowing* that the allocation was not done by "path::__str_". +// This hack forces path to allocate enough memory. +inline void PathReserve(fs::path& p, std::size_t N) { + auto const& native_ref = p.native(); + const_cast(native_ref).reserve(N); +} + +inline bool PathEq(fs::path const& LHS, fs::path const& RHS) { + return LHS.native() == RHS.native(); +} + +inline bool PathEqIgnoreSep(fs::path LHS, fs::path RHS) { + LHS.make_preferred(); + RHS.make_preferred(); + return LHS.native() == RHS.native(); +} + +template +Iter IterEnd(Iter B) { + using VT = typename std::iterator_traits::value_type; + for (; *B != VT{}; ++B) + ; + return B; +} + +template +const CharT* StrEnd(CharT const* P) { + return IterEnd(P); +} + +template +std::size_t StrLen(CharT const* P) { + return StrEnd(P) - P; +} + +const MultiStringType PathList[] = { + MKSTR(""), + MKSTR(" "), + MKSTR("//"), + MKSTR("."), + MKSTR(".."), + MKSTR("foo"), + MKSTR("/"), + MKSTR("/foo"), + MKSTR("foo/"), + MKSTR("/foo/"), + MKSTR("foo/bar"), + MKSTR("/foo/bar"), + MKSTR("//net"), + MKSTR("//net/foo"), + MKSTR("///foo///"), + MKSTR("///foo///bar"), + MKSTR("/."), + MKSTR("./"), + MKSTR("/.."), + MKSTR("../"), + MKSTR("foo/."), + MKSTR("foo/.."), + MKSTR("foo/./"), + MKSTR("foo/./bar"), + MKSTR("foo/../"), + MKSTR("foo/../bar"), + MKSTR("c:"), + MKSTR("c:/"), + MKSTR("c:foo"), + MKSTR("c:/foo"), + MKSTR("c:foo/"), + MKSTR("c:/foo/"), + MKSTR("c:/foo/bar"), + MKSTR("prn:"), + MKSTR("c:\\"), + MKSTR("c:\\foo"), + MKSTR("c:foo\\"), + MKSTR("c:\\foo\\"), + MKSTR("c:\\foo/"), + MKSTR("c:/foo\\bar"), + MKSTR("//"), + MKSTR("/finally/we/need/one/really/really/really/really/really/really/really/long/string") +}; +const unsigned PathListSize = sizeof(PathList) / sizeof(MultiStringType); + +#endif // TEST_STD_INPUT_OUTPUT_FILESYSTEMS_CLASS_PATH_PATH_HELPER_H diff --git a/libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: availability-filesystem-missing // path @@ -16,7 +17,6 @@ #include - static_assert(std::same_as, fs::path::iterator>); static_assert(std::ranges::common_range); static_assert(std::ranges::bidirectional_range); diff --git a/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/synop.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // recursive_directory_iterator diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/equal.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/equal.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/equal.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/equal.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_borrowed_range.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_borrowed_range.compile.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_borrowed_range.compile.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_borrowed_range.compile.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_view.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_view.compile.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_view.compile.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_view.compile.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.compile.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.compile.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.compile.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, windows +// UNSUPPORTED: availability-filesystem-missing // MS STL and libstdc++ use the native windows file timestamp resolution, // with 100 ns resolution. diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // @@ -18,6 +20,7 @@ #include "test_macros.h" #include "filesystem_test_helper.h" +#include "../../class.path/path_helper.h" using namespace fs; diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // @@ -20,6 +22,7 @@ #include "assert_macros.h" #include "test_macros.h" #include "filesystem_test_helper.h" +#include "../../class.path/path_helper.h" using namespace fs; diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // The string reported on errors changed, which makes those tests fail when run // against already-released libc++'s. diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp @@ -8,6 +8,8 @@ // UNSUPPORTED: c++03 // REQUIRES: long_tests +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // This test requires the dylib support introduced in D92769. // XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}} diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // This test requires the dylib support introduced in http://llvm.org/D92769. // XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}} diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // This test requires the dylib support introduced in http://llvm.org/D92769. // XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}} diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // The string reported on errors changed, which makes those tests fail when run // against already-released libc++'s. diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // The string reported on errors changed, which makes those tests fail when run // against already-released libc++'s. diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // @@ -21,7 +23,7 @@ #include "test_macros.h" #include "count_new.h" #include "filesystem_test_helper.h" - +#include "../../class.path/path_helper.h" static int count_path_elems(const fs::path& p) { int count = 0; diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove/remove.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove/remove.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove/remove.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove/remove.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp @@ -9,6 +9,8 @@ // XFAIL: LIBCXX-FREEBSD-FIXME // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp @@ -9,6 +9,8 @@ // UNSUPPORTED: c++03 // UNSUPPORTED: no-localization // UNSUPPORTED: no-threads +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status_known/status_known.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status_known/status_known.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status_known/status_known.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status_known/status_known.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp @@ -7,6 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// UNSUPPORTED: no-filesystem +// UNSUPPORTED: availability-filesystem-missing // @@ -21,7 +23,7 @@ #include "test_iterators.h" #include "count_new.h" #include "filesystem_test_helper.h" - +#include "../../class.path/path_helper.h" int main(int, char**) { diff --git a/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.compile.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.compile.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.compile.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 +// UNSUPPORTED: no-filesystem // diff --git a/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.verify.cpp b/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.verify.cpp --- a/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.verify.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.req.namespace/namespace.verify.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: c++03 || c++11 || c++14 +// UNSUPPORTED: no-filesystem // diff --git a/libcxx/test/std/time/time.clock/time.clock.file/now.pass.cpp b/libcxx/test/std/time/time.clock/time.clock.file/now.pass.cpp --- a/libcxx/test/std/time/time.clock/time.clock.file/now.pass.cpp +++ b/libcxx/test/std/time/time.clock/time.clock.file/now.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 -// UNSUPPORTED: no-filesystem // UNSUPPORTED: availability-filesystem-missing diff --git a/libcxx/test/std/time/time.clock/time.clock.file/to_from_sys.pass.cpp b/libcxx/test/std/time/time.clock/time.clock.file/to_from_sys.pass.cpp --- a/libcxx/test/std/time/time.clock/time.clock.file/to_from_sys.pass.cpp +++ b/libcxx/test/std/time/time.clock/time.clock.file/to_from_sys.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 -// UNSUPPORTED: no-filesystem // UNSUPPORTED: availability-filesystem-missing diff --git a/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp b/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp --- a/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp @@ -22,16 +22,17 @@ #include #include #include +#include #include #include #include -#include #include +#include #include #include #include -#include #include +#include #include #include #include @@ -42,9 +43,6 @@ #include "test_macros.h" #include "min_allocator.h" -#ifndef TEST_HAS_NO_FILESYSTEM -# include -#endif #ifndef TEST_HAS_NO_LOCALIZATION # include #endif @@ -196,9 +194,7 @@ assert_is_not_formattable, CharT>(); assert_is_not_formattable, CharT>(); assert_is_not_formattable(); -#ifndef TEST_HAS_NO_FILESYSTEM assert_is_not_formattable(); -#endif assert_is_not_formattable, CharT>(); #ifndef TEST_HAS_NO_LOCALIZATION if constexpr (!std::same_as) // sub_match only works with proper character types diff --git a/libcxx/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp b/libcxx/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp --- a/libcxx/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp +++ b/libcxx/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -28,17 +29,13 @@ #include #include #include -#include #include #include #include +#include #include "test_macros.h" -#ifndef TEST_HAS_NO_FILESYSTEM -# include -#endif - // [format.range.fmtkind] // If same_as>, R> is true, // format_kind is range_format::disabled. @@ -67,9 +64,7 @@ static_assert(std::ranges::input_range, "format_kind requires an input range"); static_assert(std::format_kind == std::range_format::disabled); -#ifndef TEST_HAS_NO_FILESYSTEM static_assert(std::format_kind == std::range_format::disabled); -#endif static_assert(std::format_kind> == std::range_format::map); static_assert(std::format_kind> == std::range_format::map); diff --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h --- a/libcxx/test/support/filesystem_test_helper.h +++ b/libcxx/test/support/filesystem_test_helper.h @@ -466,111 +466,6 @@ CWDGuard& operator=(CWDGuard const&) = delete; }; -// Misc test types - -const MultiStringType PathList[] = { - MKSTR(""), - MKSTR(" "), - MKSTR("//"), - MKSTR("."), - MKSTR(".."), - MKSTR("foo"), - MKSTR("/"), - MKSTR("/foo"), - MKSTR("foo/"), - MKSTR("/foo/"), - MKSTR("foo/bar"), - MKSTR("/foo/bar"), - MKSTR("//net"), - MKSTR("//net/foo"), - MKSTR("///foo///"), - MKSTR("///foo///bar"), - MKSTR("/."), - MKSTR("./"), - MKSTR("/.."), - MKSTR("../"), - MKSTR("foo/."), - MKSTR("foo/.."), - MKSTR("foo/./"), - MKSTR("foo/./bar"), - MKSTR("foo/../"), - MKSTR("foo/../bar"), - MKSTR("c:"), - MKSTR("c:/"), - MKSTR("c:foo"), - MKSTR("c:/foo"), - MKSTR("c:foo/"), - MKSTR("c:/foo/"), - MKSTR("c:/foo/bar"), - MKSTR("prn:"), - MKSTR("c:\\"), - MKSTR("c:\\foo"), - MKSTR("c:foo\\"), - MKSTR("c:\\foo\\"), - MKSTR("c:\\foo/"), - MKSTR("c:/foo\\bar"), - MKSTR("//"), - MKSTR("/finally/we/need/one/really/really/really/really/really/really/really/long/string") -}; -const unsigned PathListSize = sizeof(PathList) / sizeof(MultiStringType); - -template -Iter IterEnd(Iter B) { - using VT = typename std::iterator_traits::value_type; - for (; *B != VT{}; ++B) - ; - return B; -} - -template -const CharT* StrEnd(CharT const* P) { - return IterEnd(P); -} - -template -std::size_t StrLen(CharT const* P) { - return StrEnd(P) - P; -} - -// Testing the allocation behavior of the code_cvt functions requires -// *knowing* that the allocation was not done by "path::__str_". -// This hack forces path to allocate enough memory. -inline void PathReserve(fs::path& p, std::size_t N) { - auto const& native_ref = p.native(); - const_cast(native_ref).reserve(N); -} - -template -bool checkCollectionsEqual( - Iter1 start1, Iter1 const end1 - , Iter2 start2, Iter2 const end2 - ) -{ - while (start1 != end1 && start2 != end2) { - if (*start1 != *start2) { - return false; - } - ++start1; ++start2; - } - return (start1 == end1 && start2 == end2); -} - - -template -bool checkCollectionsEqualBackwards( - Iter1 const start1, Iter1 end1 - , Iter2 const start2, Iter2 end2 - ) -{ - while (start1 != end1 && start2 != end2) { - --end1; --end2; - if (*end1 != *end2) { - return false; - } - } - return (start1 == end1 && start2 == end2); -} - // We often need to test that the error_code was cleared if no error occurs // this function returns an error_code which is set to an error that will // never be returned by the filesystem functions. @@ -624,16 +519,6 @@ ; } -inline bool PathEq(fs::path const& LHS, fs::path const& RHS) { - return LHS.native() == RHS.native(); -} - -inline bool PathEqIgnoreSep(fs::path LHS, fs::path RHS) { - LHS.make_preferred(); - RHS.make_preferred(); - return LHS.native() == RHS.native(); -} - inline fs::perms NormalizeExpectedPerms(fs::perms P) { #ifdef _WIN32 // On Windows, fs::perms only maps down to one bit stored in the filesystem, diff --git a/libcxx/utils/data/ignore_format.txt b/libcxx/utils/data/ignore_format.txt --- a/libcxx/utils/data/ignore_format.txt +++ b/libcxx/utils/data/ignore_format.txt @@ -180,7 +180,6 @@ libcxx/include/ext/hash_map libcxx/include/ext/hash_set libcxx/include/fenv.h -libcxx/include/filesystem libcxx/include/__filesystem/copy_options.h libcxx/include/__filesystem/directory_entry.h libcxx/include/__filesystem/directory_iterator.h