[libcxx-commits] [PATCH] D120448: [libc++][AIX][test] Enable put_double/long_double locale tests
Jinsong Ji via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 23 19:01:54 PST 2022
jsji created this revision.
jsji added reviewers: PowerPC, daltenty, hubert.reinterpretcast, xingxue, Quuxplusone, philnik, ldionne.
jsji requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
AIX print -0.0 , inf, nan differently, which are causing the test
failures. We are OK for most other tests.
This patch remove the tests related these limitations condtionally on AIX,
so that we can enable the other tests to avoid losing test coverage.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D120448
Files:
libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
@@ -28,8 +28,6 @@
// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844
// XFAIL: msvc
-// XFAIL: LIBCXX-AIX-FIXME
-
#include <locale>
#include <ios>
#include <cassert>
@@ -26219,14 +26217,22 @@
test1();
test2();
test3();
+#ifndef _AIX
+ // AIX will print INF for inf and NaNQ for nan regardless of uppercase.
+ // This invalidates all asserts in test4 anf test5.
test4();
test5();
+#endif
test6();
test7();
test8();
test9();
test10();
+#ifndef _AIX
+ // AIX will print -0x0.0p for -0. regardless of showpoint.
+ // This invalidates all asserts in test11.
test11();
+#endif
test12();
std::locale lc = std::locale::classic();
std::locale lg(lc, new my_numpunct);
Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
@@ -28,8 +28,6 @@
// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844
// XFAIL: msvc
-// XFAIL: LIBCXX-AIX-FIXME
-
#include <locale>
#include <ios>
#include <cassert>
@@ -17892,7 +17890,11 @@
test4();
test5();
test6();
+#ifndef _AIX
+ // AIX libc will output -0x0.0p+0 for hexfloat -0., regardless of showpoint.
+ // This invalidates all the asserts in test7.
test7();
+#endif
test8();
return 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120448.410992.patch
Type: text/x-patch
Size: 2185 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220224/3ff832af/attachment-0001.bin>
More information about the libcxx-commits
mailing list