[libcxx-commits] [PATCH] D121003: [libcxx] [test] Fix the locale ctype widen tests on Windows

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 5 10:07:58 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6efda5e6d653: [libcxx] [test] Fix the locale ctype widen tests on Windows (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121003/new/

https://reviews.llvm.org/D121003

Files:
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp


Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: locale.en_US.UTF-8
-// XFAIL: LIBCXX-WINDOWS-FIXME
 // XFAIL: LIBCXX-AIX-FIXME
 // XFAIL: libcpp-has-no-wide-characters
 
@@ -35,7 +34,7 @@
             typedef std::ctype_byname<wchar_t> F;
             std::locale ll(l, new F(LOCALE_en_US_UTF_8));
             F const& f = std::use_facet<F>(ll);
-            std::string in(" A\x07.a1\x85");
+            std::string in(" A\x07.a1\xfb");
             std::vector<wchar_t> v(in.size());
 
             assert(f.widen(&in[0], in.data() + in.size(), v.data()) == in.data() + in.size());
@@ -54,7 +53,7 @@
             typedef std::ctype_byname<wchar_t> F;
             std::locale ll(l, new F("C"));
             const F& f = std::use_facet<F>(ll);
-            std::string in(" A\x07.a1\x85");
+            std::string in(" A\x07.a1\xfb");
             std::vector<wchar_t> v(in.size());
 
             assert(f.widen(&in[0], in.data() + in.size(), v.data()) == in.data() + in.size());
@@ -64,8 +63,8 @@
             assert(v[3] == L'.');
             assert(v[4] == L'a');
             assert(v[5] == L'1');
-#if defined(__APPLE__) || defined(__FreeBSD__)
-            assert(v[6] == L'\x85');
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32)
+            assert(v[6] == L'\xfb');
 #else
             assert(v[6] == wchar_t(-1));
 #endif
Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: locale.en_US.UTF-8
-// XFAIL: LIBCXX-WINDOWS-FIXME
 // XFAIL: LIBCXX-AIX-FIXME
 // XFAIL: libcpp-has-no-wide-characters
 
@@ -58,7 +57,7 @@
             assert(f.widen('.') == L'.');
             assert(f.widen('a') == L'a');
             assert(f.widen('1') == L'1');
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32)
             assert(f.widen(char(-5)) == L'\u00fb');
 #else
             assert(f.widen(char(-5)) == wchar_t(-1));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121003.420568.patch
Type: text/x-patch
Size: 2804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220405/82c5dd7f/attachment-0001.bin>


More information about the libcxx-commits mailing list