[libcxx-commits] [libcxx] f114edd - [libcxx][test][AIX] Fix the thousands_sep expectation for fr_FR locales (#92312)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 27 12:39:10 PDT 2024
Author: David Tenty
Date: 2024-05-27T15:39:05-04:00
New Revision: f114eddb1923289b696f1b0980cc22c4dbaafa22
URL: https://github.com/llvm/llvm-project/commit/f114eddb1923289b696f1b0980cc22c4dbaafa22
DIFF: https://github.com/llvm/llvm-project/commit/f114eddb1923289b696f1b0980cc22c4dbaafa22.diff
LOG: [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.
Added:
Modified:
libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
index d7e1178c92e04..f368b1069c063 100644
--- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.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
@@ -64,8 +63,8 @@ int main(int, char**)
// The below tests work around GLIBC's use of U202F as LC_NUMERIC thousands_sep.
std::locale l(LOCALE_fr_FR_UTF_8);
{
-#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32)
- const char sep = ' ';
+#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) || defined(_AIX)
+ const char sep = ' ';
#else
const char sep = ',';
#endif
@@ -77,11 +76,13 @@ int main(int, char**)
{
#if defined(_CS_GNU_LIBC_VERSION)
const wchar_t wsep = glibc_version_less_than("2.27") ? L' ' : L'\u202f';
-#elif defined(_WIN32)
- const wchar_t wsep = L'\u00A0';
-#else
- const wchar_t wsep = L',';
-#endif
+# elif defined(_AIX)
+ const wchar_t wsep = L'\u202F';
+# elif defined(_WIN32)
+ const wchar_t wsep = L'\u00A0';
+# else
+ const wchar_t wsep = L',';
+# endif
typedef wchar_t C;
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
assert(np.thousands_sep() == wsep);
More information about the libcxx-commits
mailing list