[libcxx-commits] [PATCH] D89679: [libcxx] [test] Mark tests for to_time_t as libcpp specific

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 19 02:50:22 PDT 2020


mstorsjo created this revision.
mstorsjo added a reviewer: libc++.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.
mstorsjo requested review of this revision.

libstdc++ on linux doesn't provide it; I'm a bit unsure how to navigate all the overloads in the documentation to see whether it really is mandated or not.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89679

Files:
  libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp


Index: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
+++ libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
@@ -385,11 +385,11 @@
     const TimeSpec dir_write_time = dir_times.write;
 
     file_time_type ftime = last_write_time(file);
-    TEST_CHECK(Clock::to_time_t(ftime) == file_write_time.tv_sec);
+    LIBCPP_ONLY(TEST_CHECK(Clock::to_time_t(ftime) == file_write_time.tv_sec));
     TEST_CHECK(CompareTime(ftime, file_write_time));
 
     file_time_type dtime = last_write_time(dir);
-    TEST_CHECK(Clock::to_time_t(dtime) == dir_write_time.tv_sec);
+    LIBCPP_ONLY(TEST_CHECK(Clock::to_time_t(dtime) == dir_write_time.tv_sec));
     TEST_CHECK(CompareTime(dtime, dir_write_time));
 
     SleepFor(Sec(2));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89679.298974.patch
Type: text/x-patch
Size: 992 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201019/7ad7a9f0/attachment.bin>


More information about the libcxx-commits mailing list