[libcxx-commits] [PATCH] D120317: [libcxx] [test] Fix get/put long_double_ru_RU on Glibc, FreeBSD and Windows
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 1 08:37:21 PST 2022
Quuxplusone requested changes to this revision.
Quuxplusone added a comment.
This revision now requires changes to proceed.
No strong objection to it as-is, but I think there are improvements possible.
================
Comment at: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp:74
+#else
+ std::string symbol = "\xD1\x80\xD1\x83\xD0\xB1"".";
#endif
----------------
Consider whether this can be simply
```
std::string symbol = "\u20BD";
~~~
std::string symbol = "\u0440\u0443\u0431.";
```
================
Comment at: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp:412-414
+ std::wstring wsymbol = L"\x20BD";
+#else
+ std::wstring wsymbol = L"\x440\x443\x431"".";
----------------
As above, can this use `\u` instead of `\x`?
================
Comment at: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp:73-75
+ std::string symbol = "\xE2\x82\xBD";
+#else
+ std::string symbol = "\xD1\x80\xD1\x83\xD0\xB1"".";
----------------
As above. I'm also starting to wonder if you now have a convenient place to hang `LocaleHelpers::russian_currency_symbol()`. :)
(Or `currency_symbol_ru_RU()` or whatever naming convention you like.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120317/new/
https://reviews.llvm.org/D120317
More information about the libcxx-commits
mailing list