Skip to content

Commit 7eeccc1

Browse files
authored
[libcxx][test] Fix numpunct grouping tests on AIX (#91781)
The `grouping` string for locale `en_US.UTF-8` and `fr_FR.UTF-8` on AIX is `3`. This is different from Linux's `3;3` but is the same as Windows. This patch removes `XFAIL: LIBCXX-AIX-FIXME` and changes to use the `WIN32` code path.
1 parent 3438d8a commit 7eeccc1

File tree

1 file changed

+5
-6
lines changed
  • libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 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
@@ -49,7 +48,7 @@ int main(int, char**)
4948
{
5049
typedef char C;
5150
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
52-
#ifdef _WIN32
51+
#if defined(_WIN32) || defined(_AIX)
5352
assert(np.grouping() == "\3");
5453
#else
5554
assert(np.grouping() == "\3\3");
@@ -59,17 +58,17 @@ int main(int, char**)
5958
{
6059
typedef wchar_t C;
6160
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
62-
#ifdef _WIN32
61+
# if defined(_WIN32) || defined(_AIX)
6362
assert(np.grouping() == "\3");
64-
#else
63+
# else
6564
assert(np.grouping() == "\3\3");
66-
#endif
65+
# endif
6766
}
6867
#endif
6968
}
7069
{
7170
std::locale l(LOCALE_fr_FR_UTF_8);
72-
#if defined(TEST_HAS_GLIBC) || defined(_WIN32)
71+
#if defined(TEST_HAS_GLIBC) || defined(_WIN32) || defined(_AIX)
7372
const char* const group = "\3";
7473
#else
7574
const char* const group = "\x7f";

0 commit comments

Comments
 (0)