[libcxx-commits] [PATCH] D120549: [libcxx] [test] Fix the monetary locale negative_sign test for en_US.UTF-8 on Windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 25 05:22:05 PST 2022
mstorsjo updated this revision to Diff 411385.
mstorsjo added a comment.
Simplify the patch significantly, fixing building in configurations without wchar available.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120549/new/
https://reviews.llvm.org/D120549
Files:
libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
@@ -11,8 +11,6 @@
// REQUIRES: locale.ru_RU.UTF-8
// REQUIRES: locale.zh_CN.UTF-8
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// <locale>
// class moneypunct_byname<charT, International>
@@ -83,20 +81,36 @@
{
Fnf f(LOCALE_en_US_UTF_8, 1);
+#if defined(_WIN32)
+ assert(f.negative_sign() == "()");
+#else
assert(f.negative_sign() == "-");
+#endif
}
{
Fnt f(LOCALE_en_US_UTF_8, 1);
+#if defined(_WIN32)
+ assert(f.negative_sign() == "()");
+#else
assert(f.negative_sign() == "-");
+#endif
}
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
{
Fwf f(LOCALE_en_US_UTF_8, 1);
+#if defined(_WIN32)
+ assert(f.negative_sign() == L"()");
+#else
assert(f.negative_sign() == L"-");
+#endif
}
{
Fwt f(LOCALE_en_US_UTF_8, 1);
+#if defined(_WIN32)
+ assert(f.negative_sign() == L"()");
+#else
assert(f.negative_sign() == L"-");
+#endif
}
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120549.411385.patch
Type: text/x-patch
Size: 1384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220225/56fa965a/attachment-0001.bin>
More information about the libcxx-commits
mailing list