17 #include "gtest/gtest.h" 26 bool Identity(
bool b) {
return b; }
104 EXPECT_TRUE(Identity(
109 EXPECT_TRUE(Identity(
128 EXPECT_TRUE(Identity(
150 EXPECT_TRUE(Identity(
163 EXPECT_TRUE(Identity(
190 struct WeakOrderingLess {
191 template <
typename T>
199 TEST(CompareResultAsLessThan, SanityTest) {
211 TEST(DoLessThanComparison, SanityTest) {
213 WeakOrderingLess weak;
225 TEST(CompareResultAsOrdering, SanityTest) {
226 EXPECT_TRUE(Identity(
228 EXPECT_FALSE(Identity(
239 EXPECT_FALSE(Identity(
241 EXPECT_TRUE(Identity(
243 EXPECT_FALSE(Identity(
252 EXPECT_FALSE(Identity(
254 EXPECT_FALSE(Identity(
256 EXPECT_TRUE(Identity(
266 TEST(DoThreeWayComparison, SanityTest) {
268 WeakOrderingLess weak;
270 EXPECT_TRUE(Identity(
272 EXPECT_FALSE(Identity(
274 EXPECT_FALSE(Identity(
276 EXPECT_TRUE(Identity(
278 EXPECT_FALSE(Identity(
280 EXPECT_FALSE(Identity(
283 EXPECT_FALSE(Identity(
285 EXPECT_TRUE(Identity(
287 EXPECT_FALSE(Identity(
289 EXPECT_FALSE(Identity(
291 EXPECT_TRUE(Identity(
293 EXPECT_FALSE(Identity(
296 EXPECT_FALSE(Identity(
298 EXPECT_FALSE(Identity(
300 EXPECT_TRUE(Identity(
302 EXPECT_FALSE(Identity(
304 EXPECT_FALSE(Identity(
306 EXPECT_TRUE(Identity(
static ABSL_CONST_INIT const partial_ordering unordered
static ABSL_CONST_INIT const partial_ordering equivalent
static ABSL_CONST_INIT const partial_ordering greater
static ABSL_CONST_INIT const weak_ordering equivalent
constexpr bool do_less_than_comparison(const Compare &compare, const K &x, const LK &y)
constexpr bool compare_result_as_less_than(const Bool r)
static ABSL_CONST_INIT const T equal
constexpr absl::weak_ordering compare_result_as_ordering(const Int c)
TEST(NotificationTest, SanityTest)
static ABSL_CONST_INIT const weak_ordering less
static ABSL_CONST_INIT const weak_ordering greater
static ABSL_CONST_INIT const weak_equality nonequivalent
static ABSL_CONST_INIT const T nonequal
constexpr absl::weak_ordering do_three_way_comparison(const Compare &compare, const K &x, const LK &y)
static ABSL_CONST_INIT const strong_ordering equivalent
static ABSL_CONST_INIT const T nonequivalent
static ABSL_CONST_INIT const partial_ordering less
static ABSL_CONST_INIT const strong_ordering equal
static ABSL_CONST_INIT const strong_ordering less
int Compare(const BigUnsigned< N > &lhs, const BigUnsigned< M > &rhs)
static ABSL_CONST_INIT const T equivalent
static ABSL_CONST_INIT const weak_equality equivalent
static ABSL_CONST_INIT const strong_ordering greater