[libc-commits] [PATCH] D159113: [libc] Fix test case that expects time_t to be a 32-bit type
Mikhail Ramalho via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Aug 29 08:34:11 PDT 2023
mikhail.ramalho created this revision.
mikhail.ramalho added reviewers: michaelrj, sivachandra.
Herald added subscribers: libc-commits, asb.
Herald added projects: libc-project, All.
mikhail.ramalho requested review of this revision.
This patch changes a test case that tests for overflow when time_t is
32-bit long, however, it was checking size_t instead of time_t.
This in on par with other testcases that correctly check the size of
time_t (asctime_test.cpp, gmtime_r_test.cpp and gmtime_test.cpp).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D159113
Files:
libc/test/src/time/mktime_test.cpp
Index: libc/test/src/time/mktime_test.cpp
===================================================================
--- libc/test/src/time/mktime_test.cpp
+++ libc/test/src/time/mktime_test.cpp
@@ -178,7 +178,7 @@
}
TEST(LlvmLibcMkTime, InvalidEndOf32BitEpochYear) {
- if (sizeof(size_t) != 4)
+ if (sizeof(time_t) != 4)
return;
{
// 2038-01-19 03:14:08 tests overflow of the second in 2038.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159113.554369.patch
Type: text/x-patch
Size: 405 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230829/62489e53/attachment.bin>
More information about the libc-commits
mailing list