Skip to content

Conversation

@xingxue-ibm
Copy link
Contributor

@xingxue-ibm xingxue-ibm commented May 10, 2024

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.

@xingxue-ibm xingxue-ibm added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label May 10, 2024
@xingxue-ibm xingxue-ibm self-assigned this May 10, 2024
@xingxue-ibm xingxue-ibm requested a review from a team as a code owner May 10, 2024 17:57
@llvmbot
Copy link
Member

llvmbot commented May 10, 2024

@llvm/pr-subscribers-libcxx

Author: Xing Xue (xingxue-ibm)

Changes

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 change to use the WIN32 code path.


Full diff: https://github.com/llvm/llvm-project/pull/91781.diff

1 Files Affected:

  • (modified) libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp (+5-6)
diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
index 2f2bc2fd88325..86c447d400aaa 100644
--- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
@@ -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
@@ -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");
@@ -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";

Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM!

@xingxue-ibm xingxue-ibm merged commit 7eeccc1 into llvm:main May 13, 2024
@xingxue-ibm xingxue-ibm deleted the grouping branch May 24, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants