[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
Fri Mar 4 09:04:27 PST 2022
mstorsjo created this revision.
mstorsjo added reviewers: Quuxplusone, Mordante.
Herald added subscribers: krytarowski, arichardson, emaste.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.
On Windows, like on macOS and FreeBSD, widening `char(-5)` succeeds
and produces `L'\u00fb'`.
This is the last instance of `LIBCXX-WINDOWS-FIXME`.
Unfortunately, this one can't be applied quite yet, it exposes
a bug in mingw-w64's btowc, fixed in
https://github.com/mingw-w64/mingw-w64/commit/707c3b81f77dd4d3b7124796a1e3f420b05c39e5. But once the CI environment is updated to a newer version
of the mingw toolchain (which we can do e.g. after LLVM 14.0.0
is released) we'll get this fix included. Putting it up for
review now already so that we can get it reviwed and done, ready
to land once the CI environment is updated.
Repository:
rG LLVM Github Monorepo
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
@@ -64,7 +63,7 @@
assert(v[3] == L'.');
assert(v[4] == L'a');
assert(v[5] == L'1');
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32)
assert(v[6] == L'\x85');
#else
assert(v[6] == wchar_t(-1));
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.413034.patch
Type: text/x-patch
Size: 1943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220304/a7550ab4/attachment-0001.bin>
More information about the libcxx-commits
mailing list