From eb4dcc744d5ca7ce59751cab9a303db587341960 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Thu, 24 Feb 2022 13:14:21 +0200 Subject: [PATCH] [libcxx] [test] Add a 'win32-' prefix to the 'broken-utf8-wchar-ctype' feature 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. Differential Revision: https://reviews.llvm.org/D120469 --- .../category.ctype/locale.ctype.byname/tolower_1.pass.cpp | 2 +- .../locale.ctype.byname/tolower_many.pass.cpp | 2 +- .../category.ctype/locale.ctype.byname/toupper_1.pass.cpp | 2 +- .../locale.ctype.byname/toupper_many.pass.cpp | 2 +- libcxx/test/std/re/re.traits/translate_nocase.pass.cpp | 2 +- libcxx/utils/libcxx/test/features.py | 14 +++++++------- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp index 5e2b81d..49b56aa 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp +++ b/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 // diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp index 289d569..952dcf4 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp +++ b/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 // diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp index d957e1e..24f8b3d 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp +++ b/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 // diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp index 7893a32..f507763 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp +++ b/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 // diff --git a/libcxx/test/std/re/re.traits/translate_nocase.pass.cpp b/libcxx/test/std/re/re.traits/translate_nocase.pass.cpp index 257c627..1048e58 100644 --- a/libcxx/test/std/re/re.traits/translate_nocase.pass.cpp +++ b/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 #include diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py index a2498ca..e98d759 100644 --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -75,14 +75,14 @@ DEFAULT_FEATURES = [ # 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 - #include - int main(int, char**) { - setlocale(LC_ALL, "en_US.UTF-8"); - return towlower(L'\\xDA') != L'\\xFA'; - } + #include + #include + int main(int, char**) { + setlocale(LC_ALL, "en_US.UTF-8"); + return towlower(L'\\xDA') != L'\\xFA'; + } """)), # Whether Bash can run on the executor. -- 2.7.4