Skip to content

Commit

Permalink
[libcxx][test] Fix numpunct grouping tests on AIX (llvm#91781)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xingxue-ibm authored May 13, 2024
1 parent 3438d8a commit 7eeccc1
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// NetBSD does not support LC_NUMERIC at the moment
// XFAIL: netbsd

// XFAIL: LIBCXX-AIX-FIXME
// XFAIL: LIBCXX-FREEBSD-FIXME

// REQUIRES: locale.en_US.UTF-8
Expand Down Expand Up @@ -49,7 +48,7 @@ int main(int, char**)
{
typedef char C;
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
#ifdef _WIN32
#if defined(_WIN32) || defined(_AIX)
assert(np.grouping() == "\3");
#else
assert(np.grouping() == "\3\3");
Expand All @@ -59,17 +58,17 @@ int main(int, char**)
{
typedef wchar_t C;
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
#ifdef _WIN32
# if defined(_WIN32) || defined(_AIX)
assert(np.grouping() == "\3");
#else
# else
assert(np.grouping() == "\3\3");
#endif
# endif
}
#endif
}
{
std::locale l(LOCALE_fr_FR_UTF_8);
#if defined(TEST_HAS_GLIBC) || defined(_WIN32)
#if defined(TEST_HAS_GLIBC) || defined(_WIN32) || defined(_AIX)
const char* const group = "\3";
#else
const char* const group = "\x7f";
Expand Down

0 comments on commit 7eeccc1

Please sign in to comment.