[libcxx-commits] [PATCH] D155019: [libc++] Fix filesystem tests on platforms that don't have IO

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 11 14:48:55 PDT 2023


ldionne created this revision.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This patch moves a few tests that were still using std::fprintf to
using TEST_REQUIRE instead, which provides a single point to tweak
for platforms that don't implement fprintf. As a fly-by fix, it also
avoids including `time_utils.h` in filesystem_clock.cpp when it is
not required, since that header makes some pretty large assumptions
about the platform it is on.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155019

Files:
  libcxx/src/filesystem/filesystem_clock.cpp
  libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp
  libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp
  libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp
  libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp
  libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp
  libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
  libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155019.539300.patch
Type: text/x-patch
Size: 12238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230711/7ad8670a/attachment.bin>


More information about the libcxx-commits mailing list