From dd5ce506f74b6b88b73f5c329ac6a33ce79a0668 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Sat, 23 Oct 2021 00:54:42 +0300 Subject: [PATCH] [libcxx] [test] Remove a LIBCXX-WINDOWS-FIXME, don't test an unsupported strftime() pattern Testing the unsupported pattern can trigger the invalid parameter handler, which depending on CRT configuration can abort the process. Differential Revision: https://reviews.llvm.org/D112352 --- .../locale.time.put/locale.time.put.members/put2.pass.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp index 20b3f43..12db93e 100644 --- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp +++ b/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 - // // class time_put @@ -321,11 +319,15 @@ int main(int, char**) 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(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(str), ios, '*', &t, '%'); std::string ex(str, iter.base()); -- 2.7.4