[libcxx-commits] [libcxx] [libcxx][test][AIX] address more platform differences in locale tests (PR #94826)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 12 09:29:27 PDT 2024
================
@@ -204,17 +209,20 @@ int main(int, char**)
std::noshowbase(ios);
}
{ // negative, showbase
- std::string v = currency_symbol + "-1,234,567.89";
- std::showbase(ios);
- typedef cpp17_input_iterator<const char*> I;
- long double ex;
- std::ios_base::iostate err = std::ios_base::goodbit;
- I iter = f.get(I(v.data()), I(v.data() + v.size()),
- false, ios, err, ex);
- assert(base(iter) == v.data() + v.size());
- assert(err == std::ios_base::eofbit);
- assert(ex == -123456789);
- std::noshowbase(ios);
+#ifdef _AIX
+ std::string v = "-" + currency_symbol + "1,234,567.89";
----------------
mordante wrote:
In my experience locale definitions are not as "universal" as expected. So we have several tests that hard-code what is used on a platform. I'm a bit surprised `U202F` was not used already. For example, `libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp` already does.
https://github.com/llvm/llvm-project/pull/94826
More information about the libcxx-commits
mailing list