[libcxx-commits] [PATCH] D112352: [libcxx] [test] Remove a LIBCXX-WINDOWS-FIXME, don't test an unsupported strftime() pattern
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 22 14:56:22 PDT 2021
mstorsjo created this revision.
mstorsjo added a reviewer: ldionne.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.
Testing the unsupported pattern can trigger the invalid parameter handler,
which depending on CRT configuration can abort the process.
Split this out from D112211 <https://reviews.llvm.org/D112211>, as this XFAIL actually can be fixed pretty
easily.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112352
Files:
libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// <locale>
// class time_put<charT, OutputIterator>
@@ -321,11 +319,15 @@
std::string ex(str, iter.base());
// assert(ex == "-0400"); depends on time zone
}
+#ifndef _WIN32
+ // The Windows strftime() doesn't support the "%+" format. Depending on CRT
+ // configuration of the invalid parameter handler, this can abort the process.
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, '+');
std::string ex(str, iter.base());
// assert(ex == "Sat May 2 13:03:06 EDT 2009"); depends on time zone
}
+#endif
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, '%');
std::string ex(str, iter.base());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112352.381667.patch
Type: text/x-patch
Size: 1268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211022/94514187/attachment-0001.bin>
More information about the libcxx-commits
mailing list