[libcxx-commits] [libcxx] [libcxx][test][AIX] address more platform differences in locale tests (PR #94826)
David Tenty via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 14 08:12:54 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";
----------------
daltenty wrote:
> 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.
Yeah, it seems to be the case that some tests put that platform specific knowledge into a common place and others `platform_support.h` and others just hardcode it in the individual test, so even though we fixed in one test others are still affected. I think cleaning that up could help the maintainability concerns here. I'll try to take a look into that as a follow on to this PR.
https://github.com/llvm/llvm-project/pull/94826
More information about the libcxx-commits
mailing list