[libcxx-commits] [PATCH] D118238: [libcxx] [test] Simplify the handling of platform specific NAN formatting in put_long_double

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 10 10:00:32 PST 2022


Mordante added inline comments.


================
Comment at: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp:10911
                                     std::string ex(str, iter.base());
-#if defined(TEST_HAS_GLIBC)
-                                    assert(ex == "*********************+nan");
-#else
-                                    assert(ex == "**********************nan");
-#endif
+                                    assert(ex == pnan_padding25 + pnan);
                                     assert(ios.width() == 0);
----------------
How do you feel about always using strings like `pnan_padding25 + pnan_sign + "nan"` and not have `pnan` and `PNAN`?


================
Comment at: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp:24417
     std::locale lg(lc, new my_numpunct);
-#if defined(__APPLE__) && defined(__x86_64__)
+#if (defined(__APPLE__) || defined(TEST_HAS_GLIBC)) && defined(__x86_64__)
 // This test is failing on FreeBSD, possibly due to different representations
----------------
Is this change still needed? The test currently passes CI without this change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118238/new/

https://reviews.llvm.org/D118238



More information about the libcxx-commits mailing list