[PATCH] libc++: Don't let time_put test use implementation dependent constructs
Ed Schouten
ed at nuxi.nl
Sun Mar 15 12:10:11 PDT 2015
Hi mclow.lists, jroelofs,
The time_put test doesn't seem to work on Linux and CloudABI. For Linux we already have an XFAIL. Closer inspection seems to reveal that this test does not pass for a couple of reasons.
First of all, the tm_yday field is set to an invalid value. The strftime() function doesn't behave consistently across platforms in case the values in the tm structure are incoherent. Fix up this field to have the value 121, which corresponds with tm_mday and tm_year. This of course affects the output of time_put for some modifiers, so update the tests accordingly.
Second, some of the tests actually use modifiers that are only present on BSD derived systems. They are not part of the C standard/POSIX. Simply remove them.
Finally, some of the tests actually use invalid modifiers, causing a malformed format string to be passed to strftime(). Remove these tests as well.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D8349
Files:
test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8349.21999.patch
Type: text/x-patch
Size: 5043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150315/2e17328c/attachment.bin>
More information about the cfe-commits
mailing list