forked from OSchip/llvm-project
[libc++][NFC] Remove TEST_HAS_NO_SPACESHIP_OPERATOR
The corresponding _LIBCPP_HAS_NO_SPACESHIP_OPERATOR macro was already
removed in commit c0f87e8382
Differential Revision: https://reviews.llvm.org/D131215
This commit is contained in:
parent
a044d0491e
commit
cfefee87c2
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -209,11 +209,6 @@
|
|||
#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(...)
|
||||
|
|
Loading…
Reference in New Issue