[libcxx-commits] [PATCH] D128220: [libc++][lit][AIX] Port tests for money format to AIX

Xing Xue via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 20 14:24:28 PDT 2022


xingxue updated this revision to Diff 438474.
xingxue added a comment.

Add one more test case `thousands_sep.pass.cpp`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128220

Files:
  libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
  libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
  libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp


Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
@@ -8,7 +8,6 @@
 
 // NetBSD does not support LC_MONETARY at the moment
 // XFAIL: netbsd
-// XFAIL: LIBCXX-AIX-FIXME
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
@@ -115,6 +114,8 @@
     const wchar_t fr_sep = glibc_version_less_than("2.27") ? L' ' : L'\u202F';
 #elif defined(_WIN32)
     const wchar_t fr_sep = L'\u00A0';
+#elif defined(_AIX)
+    const wchar_t fr_sep = L'\u202F';
 #else
     const wchar_t fr_sep = L' ';
 #endif
@@ -145,7 +146,7 @@
     // FIXME libc++ specifically works around \u00A0 by translating it into
     // a regular space.
     const wchar_t wsep = glibc_version_less_than("2.27") ? L'\u00A0' : L'\u202F';
-#   elif defined(_WIN32)
+#   elif defined(_WIN32) || defined(_AIX)
     const wchar_t wsep = L'\u00A0';
 #   else
     const wchar_t wsep = L' ';
Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
@@ -8,7 +8,6 @@
 //
 // NetBSD does not support LC_MONETARY at the moment
 // XFAIL: netbsd
-// XFAIL: LIBCXX-AIX-FIXME
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
@@ -191,7 +190,7 @@
     {
         Fnf f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(_AIX)
         assert_sign_symbol_none_value(p);
 #else
         assert_symbol_sign_none_value(p);
@@ -210,7 +209,7 @@
     {
         Fwf f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(_AIX)
         assert_sign_symbol_none_value(p);
 #else
         assert_symbol_sign_none_value(p);
Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
@@ -8,7 +8,6 @@
 //
 // NetBSD does not support LC_MONETARY at the moment
 // XFAIL: netbsd
-// XFAIL: LIBCXX-AIX-FIXME
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
@@ -207,7 +206,11 @@
     {
         Fnf f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
+#ifdef _AIX
+        assert_sign_symbol_none_value(p);
+#else
         assert_symbol_sign_none_value(p);
+#endif
     }
     {
         Fnt f(LOCALE_zh_CN_UTF_8, 1);
@@ -222,7 +225,11 @@
     {
         Fwf f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
+#ifdef _AIX
+        assert_sign_symbol_none_value(p);
+#else
         assert_symbol_sign_none_value(p);
+#endif
     }
     {
         Fwt f(LOCALE_zh_CN_UTF_8, 1);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128220.438474.patch
Type: text/x-patch
Size: 3554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220620/ae573914/attachment.bin>


More information about the libcxx-commits mailing list