[libc++][NFC] Remove TEST_HAS_NO_SPACESHIP_OPERATOR
authorAdrian Vogelsgesang <avogelsgesang@tableau.com>
Thu, 4 Aug 2022 22:43:59 +0000 (15:43 -0700)
committerAdrian Vogelsgesang <avogelsgesang@salesforce.com>
Tue, 9 Aug 2022 23:32:54 +0000 (16:32 -0700)
The corresponding _LIBCPP_HAS_NO_SPACESHIP_OPERATOR macro was already
removed in commit c0f87e8382

Differential Revision: https://reviews.llvm.org/D131215

libcxx/test/std/language.support/cmp/cmp.partialord/partialord.pass.cpp
libcxx/test/std/language.support/cmp/cmp.strongord/strongord.pass.cpp
libcxx/test/std/language.support/cmp/cmp.weakord/weakord.pass.cpp
libcxx/test/support/test_macros.h

index 079a5e9..7d0ddb3 100644 (file)
@@ -43,23 +43,19 @@ void test_signatures() {
   ASSERT_NOEXCEPT(Eq > 0);
   ASSERT_NOEXCEPT(0 >= Eq);
   ASSERT_NOEXCEPT(Eq >= 0);
-#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR
   ASSERT_NOEXCEPT(0 <=> Eq);
   ASSERT_NOEXCEPT(Eq <=> 0);
   ASSERT_SAME_TYPE(decltype(Eq <=> 0), std::partial_ordering);
   ASSERT_SAME_TYPE(decltype(0 <=> Eq), std::partial_ordering);
-#endif
 }
 
 constexpr void test_equality() {
-#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR
   auto& PartialEq = std::partial_ordering::equivalent;
   auto& WeakEq = std::weak_ordering::equivalent;
   assert(PartialEq == WeakEq);
 
   auto& StrongEq = std::strong_ordering::equal;
   assert(PartialEq == StrongEq);
-#endif
 }
 
 constexpr bool test_constexpr() {
@@ -96,7 +92,6 @@ constexpr bool test_constexpr() {
     assert((0 <= V) == (TC.ExpectGreater || TC.ExpectEq));
     assert((0 >= V) == (TC.ExpectLess || TC.ExpectEq));
   }
-#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR
   {
     std::partial_ordering res = (Eq <=> 0);
     ((void)res);
@@ -179,7 +174,6 @@ constexpr bool test_constexpr() {
   }
 
   test_equality();
-#endif
 
   return true;
 }
index 822c4f2..cefea50 100644 (file)
@@ -43,23 +43,19 @@ void test_signatures() {
   ASSERT_NOEXCEPT(Eq > 0);
   ASSERT_NOEXCEPT(0 >= Eq);
   ASSERT_NOEXCEPT(Eq >= 0);
-#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR
   ASSERT_NOEXCEPT(0 <=> Eq);
   ASSERT_NOEXCEPT(Eq <=> 0);
   ASSERT_SAME_TYPE(decltype(Eq <=> 0), std::strong_ordering);
   ASSERT_SAME_TYPE(decltype(0 <=> Eq), std::strong_ordering);
-#endif
 }
 
 constexpr void test_equality() {
-#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR
   auto& StrongEq = std::strong_ordering::equal;
   auto& PartialEq = std::partial_ordering::equivalent;
   assert(StrongEq == PartialEq);
 
   auto& WeakEq = std::weak_ordering::equivalent;
   assert(StrongEq == WeakEq);
-#endif
 }
 
 constexpr bool test_conversion() {
@@ -135,7 +131,6 @@ constexpr bool test_constexpr() {
     assert((0 <= V) == (TC.ExpectGreater || TC.ExpectEq));
     assert((0 >= V) == (TC.ExpectLess || TC.ExpectEq));
   }
-#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR
   {
     std::strong_ordering res = (Eq <=> 0);
     ((void)res);
@@ -187,7 +182,6 @@ constexpr bool test_constexpr() {
   }
 
   test_equality();
-#endif
 
   return true;
 }
index a053791..d538898 100644 (file)
@@ -42,12 +42,10 @@ void test_signatures() {
   ASSERT_NOEXCEPT(Eq > 0);
   ASSERT_NOEXCEPT(0 >= Eq);
   ASSERT_NOEXCEPT(Eq >= 0);
-#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR
   ASSERT_NOEXCEPT(0 <=> Eq);
   ASSERT_NOEXCEPT(Eq <=> 0);
   ASSERT_SAME_TYPE(decltype(Eq <=> 0), std::weak_ordering);
   ASSERT_SAME_TYPE(decltype(0 <=> Eq), std::weak_ordering);
-#endif
 }
 
 constexpr bool test_conversion() {
@@ -72,14 +70,12 @@ constexpr bool test_conversion() {
 }
 
 constexpr void test_equality() {
-#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR
   auto& WeakEq = std::weak_ordering::equivalent;
   auto& PartialEq = std::partial_ordering::equivalent;
   assert(WeakEq == PartialEq);
 
   auto& StrongEq = std::strong_ordering::equal;
   assert(WeakEq == StrongEq);
-#endif
 }
 
 constexpr bool test_constexpr() {
@@ -114,7 +110,6 @@ constexpr bool test_constexpr() {
     assert((0 <= V) == (TC.ExpectGreater || TC.ExpectEq));
     assert((0 >= V) == (TC.ExpectLess || TC.ExpectEq));
   }
-#ifndef TEST_HAS_NO_SPACESHIP_OPERATOR
   {
     std::weak_ordering res = (Eq <=> 0);
     ((void)res);
@@ -169,7 +164,6 @@ constexpr bool test_constexpr() {
   }
 
   test_equality();
-#endif
 
   return true;
 }
index 89fa90f..e8539cb 100644 (file)
 #define TEST_CONSTINIT
 #endif
 
-#if !defined(__cpp_impl_three_way_comparison) \
-    && (!defined(_MSC_VER) || defined(__clang__) || _MSC_VER < 1920 || _MSVC_LANG <= 201703L)
-#define TEST_HAS_NO_SPACESHIP_OPERATOR
-#endif
-
 #if TEST_STD_VER < 11
 #define ASSERT_NOEXCEPT(...)
 #define ASSERT_NOT_NOEXCEPT(...)