Skip to content

Commit 3438d8a

Browse files
authored
[libcxx] [test] Fix the locale ctype widen tests on AIX (#91744)
The C locale on AIX uses `ISO-8859-1`, where `0xFB` is a valid character. Widening char(-5) succeeds and produces L'\u00fb' the same as on macOS, FreeBSD, and Windows. This patch removes `XFAIL: LIBCXX-AIX-FIXME` and uses the macOS, FreeBSD, and WIN32 code path for AIX.
1 parent 119aecb commit 3438d8a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88

99
// REQUIRES: locale.en_US.UTF-8
10-
// XFAIL: LIBCXX-AIX-FIXME
1110
// XFAIL: no-wide-characters
1211

1312
// <locale>
@@ -57,7 +56,7 @@ int main(int, char**)
5756
assert(f.widen('.') == L'.');
5857
assert(f.widen('a') == L'a');
5958
assert(f.widen('1') == L'1');
60-
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32)
59+
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(_AIX)
6160
assert(f.widen(char(-5)) == L'\u00fb');
6261
#else
6362
assert(f.widen(char(-5)) == wchar_t(-1));

libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88

99
// REQUIRES: locale.en_US.UTF-8
10-
// XFAIL: LIBCXX-AIX-FIXME
1110
// XFAIL: no-wide-characters
1211

1312
// <locale>
@@ -63,7 +62,7 @@ int main(int, char**)
6362
assert(v[3] == L'.');
6463
assert(v[4] == L'a');
6564
assert(v[5] == L'1');
66-
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32)
65+
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(_AIX)
6766
assert(v[6] == L'\xfb');
6867
#else
6968
assert(v[6] == wchar_t(-1));

0 commit comments

Comments
 (0)