[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 12:51:18 PDT 2022


xingxue created this revision.
xingxue added reviewers: philnik, Mordante, ldionne, hubert.reinterpretcast, DiggerLin.
xingxue added a project: LLVM.
Herald added a project: All.
xingxue requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This patch ports libc++ LIT test cases for money formats to AIX.  On AIX, the money format of locale `zh_CN.UTF-8` is the similar to that of `en_US.UTF-8`, i.e., `sign`, `symbol`, `none`, `value`.


Repository:
  rG LLVM Github Monorepo

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


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.438458.patch
Type: text/x-patch
Size: 2322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220620/0aee0cce/attachment.bin>


More information about the libcxx-commits mailing list