llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.78k stars 11.9k forks source link

[libcxx][test][AIX] Fix the thousands_sep expectation for fr_FR locales #92312

Closed daltenty closed 5 months ago

daltenty commented 5 months ago

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.

llvmbot commented 5 months ago

@llvm/pr-subscribers-libcxx

Author: David Tenty (daltenty)

Changes 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. --- Full diff: https://github.com/llvm/llvm-project/pull/92312.diff 1 Files Affected: - (modified) libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp (+3-2) ``````````diff 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..afab7f4e7d19f 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,7 +63,7 @@ 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) +#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) || defined(_AIX) const char sep = ' '; #else const char sep = ','; @@ -77,6 +76,8 @@ 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(_AIX) + const wchar_t wsep = L'\u202f'; #elif defined(_WIN32) const wchar_t wsep = L'\u00A0'; #else ``````````
github-actions[bot] commented 5 months ago

:white_check_mark: With the latest revision this PR passed the C/C++ code formatter.