[libcxx-commits] [libcxx] [libcxx][test] Use long double test macro in strong_order.pass.cpp (PR #106742)

David Spickett via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 30 08:45:06 PDT 2024


https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/106742

>From 43bd418f6cdd4e1eaaa6ecd366bcc35f3046e621 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Fri, 30 Aug 2024 14:39:00 +0000
Subject: [PATCH 1/2] [libcxx][test] Use long double test macro in
 strong_order.pass.cpp

---
 .../language.support/cmp/cmp.alg/strong_order.pass.cpp    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libcxx/test/std/language.support/cmp/cmp.alg/strong_order.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.alg/strong_order.pass.cpp
index ac6b6879f77309..1503f8d9a721c8 100644
--- a/libcxx/test/std/language.support/cmp/cmp.alg/strong_order.pass.cpp
+++ b/libcxx/test/std/language.support/cmp/cmp.alg/strong_order.pass.cpp
@@ -454,12 +454,16 @@ int main(int, char**)
     test_1_2();
     test_1_3<float>();
     test_1_3<double>();
-    // test_1_3<long double>();  // UNIMPLEMENTED
+#ifdef TEST_LONG_DOUBLE_IS_DOUBLE
+    test_1_3<long double>(); // UNIMPLEMENTED for 16 byte long double
+#endif
     test_1_4();
 
     static_assert(test_1_3<float>());
     static_assert(test_1_3<double>());
-    // static_assert(test_1_3<long double>());  // UNIMPLEMENTED
+#ifdef TEST_LONG_DOUBLE_IS_DOUBLE
+    static_assert(test_1_3<long double>()); // UNIMPLEMENTED for 16 byte long double
+#endif
     static_assert(test_1_4());
 
     return 0;

>From 82af33a489f3fe92a79d88c8948e72beea2042a1 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Fri, 30 Aug 2024 15:44:40 +0000
Subject: [PATCH 2/2] update comment

---
 .../std/language.support/cmp/cmp.alg/strong_order.pass.cpp    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcxx/test/std/language.support/cmp/cmp.alg/strong_order.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.alg/strong_order.pass.cpp
index 1503f8d9a721c8..e384ea289bb5bf 100644
--- a/libcxx/test/std/language.support/cmp/cmp.alg/strong_order.pass.cpp
+++ b/libcxx/test/std/language.support/cmp/cmp.alg/strong_order.pass.cpp
@@ -455,14 +455,14 @@ int main(int, char**)
     test_1_3<float>();
     test_1_3<double>();
 #ifdef TEST_LONG_DOUBLE_IS_DOUBLE
-    test_1_3<long double>(); // UNIMPLEMENTED for 16 byte long double
+    test_1_3<long double>(); // UNIMPLEMENTED when long double is a distinct type
 #endif
     test_1_4();
 
     static_assert(test_1_3<float>());
     static_assert(test_1_3<double>());
 #ifdef TEST_LONG_DOUBLE_IS_DOUBLE
-    static_assert(test_1_3<long double>()); // UNIMPLEMENTED for 16 byte long double
+    static_assert(test_1_3<long double>()); // UNIMPLEMENTED when long double is a distinct type
 #endif
     static_assert(test_1_4());
 



More information about the libcxx-commits mailing list