This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix filesystem tests on platforms that don't have IO
ClosedPublic

Authored by ldionne on Jul 11 2023, 2:48 PM.

Details

Summary

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.

Diff Detail

Event Timeline

ldionne created this revision.Jul 11 2023, 2:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 2:48 PM
ldionne requested review of this revision.Jul 11 2023, 2:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 2:48 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne updated this revision to Diff 539507.Jul 12 2023, 5:04 AM

Add missing includes to test.

ldionne updated this revision to Diff 539713.Jul 12 2023, 1:34 PM

Fix unused var warning.

ldionne updated this revision to Diff 539751.Jul 12 2023, 3:04 PM

Fix C++11 build.

philnik accepted this revision.Jul 13 2023, 8:39 AM
This revision is now accepted and ready to land.Jul 13 2023, 8:39 AM