Skip to content

Commit f114edd

Browse files
authored
[libcxx][test][AIX] Fix the thousands_sep expectation for fr_FR locales (#92312)
Similar to some other platforms, AIX uses ' ' for non-wide characters and U202F for wide characters, so this change opts into those paths for AIX as well.
1 parent 59c6bd1 commit f114edd

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// NetBSD does not support LC_NUMERIC at the moment
1010
// XFAIL: netbsd
1111

12-
// XFAIL: LIBCXX-AIX-FIXME
1312
// XFAIL: LIBCXX-FREEBSD-FIXME
1413

1514
// REQUIRES: locale.en_US.UTF-8
@@ -64,8 +63,8 @@ int main(int, char**)
6463
// The below tests work around GLIBC's use of U202F as LC_NUMERIC thousands_sep.
6564
std::locale l(LOCALE_fr_FR_UTF_8);
6665
{
67-
#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32)
68-
const char sep = ' ';
66+
#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) || defined(_AIX)
67+
const char sep = ' ';
6968
#else
7069
const char sep = ',';
7170
#endif
@@ -77,11 +76,13 @@ int main(int, char**)
7776
{
7877
#if defined(_CS_GNU_LIBC_VERSION)
7978
const wchar_t wsep = glibc_version_less_than("2.27") ? L' ' : L'\u202f';
80-
#elif defined(_WIN32)
81-
const wchar_t wsep = L'\u00A0';
82-
#else
83-
const wchar_t wsep = L',';
84-
#endif
79+
# elif defined(_AIX)
80+
const wchar_t wsep = L'\u202F';
81+
# elif defined(_WIN32)
82+
const wchar_t wsep = L'\u00A0';
83+
# else
84+
const wchar_t wsep = L',';
85+
# endif
8586
typedef wchar_t C;
8687
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
8788
assert(np.thousands_sep() == wsep);

0 commit comments

Comments
 (0)