Fix two test failures in <experimental/filesystem>
authorEric Fiselier <eric@efcs.ca>
Fri, 20 Jul 2018 01:51:48 +0000 (01:51 +0000)
committerEric Fiselier <eric@efcs.ca>
Fri, 20 Jul 2018 01:51:48 +0000 (01:51 +0000)
First, <experimental/filesystem> didn't correctly guard
against min/max macros. This adds the proper push/pop macro guards.

Second, an internal time helper had been renamed but the test for
it hadn't been updated. This patch updates those tests.

llvm-svn: 337520

libcxx/include/experimental/filesystem
libcxx/test/libcxx/experimental/filesystem/convert_file_time.sh.cpp

index 6481aa6..2d2c117 100644 (file)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
 #define __cpp_lib_experimental_filesystem 201406
 
 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM
@@ -2647,4 +2650,6 @@ recursive_directory_iterator end(const recursive_directory_iterator&) _NOEXCEPT
 
 _LIBCPP_END_NAMESPACE_EXPERIMENTAL_FILESYSTEM
 
+_LIBCPP_POP_MACROS
+
 #endif // _LIBCPP_EXPERIMENTAL_FILESYSTEM
index e418851..cc1696c 100644 (file)
@@ -28,7 +28,7 @@
 using namespace std::chrono;
 namespace fs = std::experimental::filesystem;
 using fs::file_time_type;
-using fs::detail::fs_time_util;
+using fs::detail::time_util::fs_time_util;
 
 enum TestKind { TK_64Bit, TK_32Bit, TK_FloatingPoint };