[libcxx-commits] [PATCH] D110988: [libcxx] [test] Move a missed test to ctime.timespec.compile.pass.cpp

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Oct 2 01:17:48 PDT 2021


mstorsjo created this revision.
mstorsjo added a reviewer: ldionne.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++.

This was missed in ec574f5da463d303a3771597c233e52d2429db67 <https://reviews.llvm.org/rGec574f5da463d303a3771597c233e52d2429db67>. TIME_UTC
is a define that belongs together with timespec_get. The testcase
it's moved to is only run for >= C++17, so the surrounding ifdef guard
can be dropped.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110988

Files:
  libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
  libcxx/test/std/language.support/support.runtime/ctime.timespec.compile.pass.cpp


Index: libcxx/test/std/language.support/support.runtime/ctime.timespec.compile.pass.cpp
===================================================================
--- libcxx/test/std/language.support/support.runtime/ctime.timespec.compile.pass.cpp
+++ libcxx/test/std/language.support/support.runtime/ctime.timespec.compile.pass.cpp
@@ -18,5 +18,9 @@
 #include <ctime>
 #include <type_traits>
 
+#ifndef TIME_UTC
+#error TIME_UTC not defined
+#endif
+
 std::timespec tmspec = {};
 static_assert(std::is_same<decltype(std::timespec_get(&tmspec, 0)), int>::value, "");
Index: libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
===================================================================
--- libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
+++ libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
@@ -20,12 +20,6 @@
 #error CLOCKS_PER_SEC not defined
 #endif
 
-#if TEST_STD_VER > 14
-#ifndef TIME_UTC
-#error TIME_UTC not defined
-#endif
-#endif
-
 int main(int, char**)
 {
     std::clock_t c = 0;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110988.376678.patch
Type: text/x-patch
Size: 1038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211002/a5c4f30e/attachment.bin>


More information about the libcxx-commits mailing list