[libcxx-commits] [PATCH] D120550: [libcxx] [test] Fix the monetary locale pos/neg_format test for Windows and macOS
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 25 02:10:56 PST 2022
mstorsjo created this revision.
mstorsjo added reviewers: Mordante, Quuxplusone.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.
The zh_CN.UTF-8 locale on Glibc has got `n_sign_posn == 4` (which means
having the negative sign just after the currency symbol), but has
`int_n_sign_posn == 1` (which means before the string).
On Windows, there's no separate `int_n_sign_posn` field, so the same
`n_sign_posn` (which is 4 there too) is used for international currency
formatting too. This makes the ordering for the international case on
Windows be the same as for the national one right above it.
On Apple platforms, the fr_FR.UTF-8 locale has got `n_sign_posn == 2`
but `p_sign_posn == 1`, giving a different order for the French locale
for the negative format.
On Apple platforms for the zh_CN.UTF-8 locale, both `n_sign_posn` and
`int_n_sign_posn` are 4, but `p_sign_posn` and `int_p_sign_posn` are 1.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D120550
Files:
libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120550.411357.patch
Type: text/x-patch
Size: 7651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220225/9783b3cb/attachment.bin>
More information about the libcxx-commits
mailing list