[libcxx-commits] [PATCH] D89535: [libcxx] [test] Split the file_time_type synopsis test
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 16 12:32:42 PDT 2020
mstorsjo updated this revision to Diff 298718.
mstorsjo retitled this revision from "[libcxx] [test] Ifdef out the time point resolution and range check on windows" to "[libcxx] [test] Split the file_time_type synopsis test".
mstorsjo edited the summary of this revision.
mstorsjo added a comment.
Split the test into two, instead of adding ifdefs.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89535/new/
https://reviews.llvm.org/D89535
Files:
libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp
libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.pass.cpp
Index: libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.pass.cpp
===================================================================
--- /dev/null
+++ libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, windows
+
+// MS STL and libstdc++ use the native windows file timestamp resolution,
+// with 100 ns resolution.
+
+// <filesystem>
+
+// typedef TrivialClock file_time_type;
+
+#include "filesystem_include.h"
+#include <chrono>
+#include <type_traits>
+
+#include "test_macros.h"
+
+void test_time_point_resolution_and_range() {
+ using namespace fs;
+ using Dur = file_time_type::duration;
+ using Period = Dur::period;
+ ASSERT_SAME_TYPE(Period, std::nano);
+}
+
+int main(int, char**) {
+ test_time_point_resolution_and_range();
+
+ return 0;
+}
Index: libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp
+++ libcxx/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp
@@ -32,16 +32,8 @@
((void)odr_use);
}
-void test_time_point_resolution_and_range() {
- using namespace fs;
- using Dur = file_time_type::duration;
- using Period = Dur::period;
- ASSERT_SAME_TYPE(Period, std::nano);
-}
-
int main(int, char**) {
test_trivial_clock();
- test_time_point_resolution_and_range();
return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89535.298718.patch
Type: text/x-patch
Size: 1955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201016/94cada32/attachment-0001.bin>
More information about the libcxx-commits
mailing list