[libc++][lit][AIX] Port tests for money format to AIX

Summary:
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.

Reviewed by: Mordante, DiggerLin, libc++

Differential Revision: https://reviews.llvm.org/D128220
This commit is contained in:
Xing Xue 2022-06-27 15:57:54 -04:00
parent 0533b6e2f6
commit 80baa56c46
3 changed files with 13 additions and 6 deletions

View File

@ -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 @@ int main(int, char**)
{
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 @@ int main(int, char**)
{
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);

View File

@ -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 @@ int main(int, char**)
{
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 @@ int main(int, char**)
{
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);

View File

@ -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 @@ int main(int, char**)
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 @@ int main(int, char**)
// 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' ';