[libcxx-commits] [PATCH] D120469: [libcxx] [test] Add a 'win32-' prefix to the 'broken-utf8-wchar-ctype' feature

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 24 03:35:48 PST 2022


mstorsjo created this revision.
mstorsjo added a reviewer: Quuxplusone.
Herald added a subscriber: arichardson.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.

This was suggested in the review of https://reviews.llvm.org/D120022.

Also indent the code for the compilation test one step compared
to the surrounding expression.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120469

Files:
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
  libcxx/test/std/re/re.traits/translate_nocase.pass.cpp
  libcxx/utils/libcxx/test/features.py


Index: libcxx/utils/libcxx/test/features.py
===================================================================
--- libcxx/utils/libcxx/test/features.py
+++ libcxx/utils/libcxx/test/features.py
@@ -75,14 +75,14 @@
 
   # Check for a Windows UCRT bug (fixed in UCRT/Windows 10.0.20348.0):
   # https://developercommunity.visualstudio.com/t/utf-8-locales-break-ctype-functions-for-wchar-type/1653678
-  Feature(name='broken-utf8-wchar-ctype',
+  Feature(name='win32-broken-utf8-wchar-ctype',
           when=lambda cfg: '_WIN32' in compilerMacros(cfg) and not programSucceeds(cfg, """
-          #include <locale.h>
-          #include <wctype.h>
-          int main(int, char**) {
-            setlocale(LC_ALL, "en_US.UTF-8");
-            return towlower(L'\\xDA') != L'\\xFA';
-          }
+            #include <locale.h>
+            #include <wctype.h>
+            int main(int, char**) {
+              setlocale(LC_ALL, "en_US.UTF-8");
+              return towlower(L'\\xDA') != L'\\xFA';
+            }
           """)),
 
   # Check for a Windows UCRT bug (fixed in UCRT/Windows 10.0.19041.0).
Index: libcxx/test/std/re/re.traits/translate_nocase.pass.cpp
===================================================================
--- libcxx/test/std/re/re.traits/translate_nocase.pass.cpp
+++ libcxx/test/std/re/re.traits/translate_nocase.pass.cpp
@@ -13,7 +13,7 @@
 // charT translate_nocase(charT c) const;
 
 // REQUIRES: locale.en_US.UTF-8
-// XFAIL: broken-utf8-wchar-ctype
+// XFAIL: win32-broken-utf8-wchar-ctype
 
 #include <regex>
 #include <cassert>
Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: locale.en_US.UTF-8
-// XFAIL: broken-utf8-wchar-ctype
+// XFAIL: win32-broken-utf8-wchar-ctype
 
 // <locale>
 
Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: locale.en_US.UTF-8
-// XFAIL: broken-utf8-wchar-ctype
+// XFAIL: win32-broken-utf8-wchar-ctype
 
 // <locale>
 
Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: locale.en_US.UTF-8
-// XFAIL: broken-utf8-wchar-ctype
+// XFAIL: win32-broken-utf8-wchar-ctype
 
 // <locale>
 
Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: locale.en_US.UTF-8
-// XFAIL: broken-utf8-wchar-ctype
+// XFAIL: win32-broken-utf8-wchar-ctype
 
 // <locale>
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120469.411063.patch
Type: text/x-patch
Size: 4031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220224/1e286849/attachment-0001.bin>


More information about the libcxx-commits mailing list