[libcxx-commits] [libcxx] dd5ce50 - [libcxx] [test] Remove a LIBCXX-WINDOWS-FIXME, don't test an unsupported strftime() pattern

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 2 12:54:09 PDT 2021


Author: Martin Storsjö
Date: 2021-11-02T21:53:15+02:00
New Revision: dd5ce506f74b6b88b73f5c329ac6a33ce79a0668

URL: https://github.com/llvm/llvm-project/commit/dd5ce506f74b6b88b73f5c329ac6a33ce79a0668
DIFF: https://github.com/llvm/llvm-project/commit/dd5ce506f74b6b88b73f5c329ac6a33ce79a0668.diff

LOG: [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

Added: 
    

Modified: 
    libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp

Removed: 
    


################################################################################
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 20b3f4337d68a..12db93ea54340 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
-
 // <locale>
 
 // class time_put<charT, OutputIterator>
@@ -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<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());


        


More information about the libcxx-commits mailing list