Lines Matching refs:rhs

33 void testTwoWayComparisons( const T& lhs, const T& rhs ) {  in testTwoWayComparisons()  argument
34 REQUIRE_MESSAGE(((lhs < rhs) == ExpectLess), in testTwoWayComparisons()
36 REQUIRE_MESSAGE(((lhs <= rhs) == (ExpectLess || ExpectEqual)), in testTwoWayComparisons()
39 REQUIRE_MESSAGE(((lhs > rhs) == ExpectGreater), in testTwoWayComparisons()
41 REQUIRE_MESSAGE(((lhs >= rhs) == (ExpectGreater || ExpectEqual)), in testTwoWayComparisons()
46 void testEqualityComparisons( const T& lhs, const T& rhs ) { in testEqualityComparisons() argument
47 REQUIRE_MESSAGE((lhs == rhs) == ExpectEqual, in testEqualityComparisons()
49 REQUIRE_MESSAGE((lhs != rhs) == !ExpectEqual, in testEqualityComparisons()
55 void testThreeWayComparisons( const T& lhs, const T& rhs ) { in testThreeWayComparisons() argument
56 auto three_way_result = lhs <=> rhs; in testThreeWayComparisons()
59 REQUIRE_MESSAGE((lhs <=> rhs <= 0) == (ExpectLess || ExpectEqual), in testThreeWayComparisons()
62 REQUIRE_MESSAGE((lhs <=> rhs > 0) == ExpectGreater, in testThreeWayComparisons()
64 REQUIRE_MESSAGE((lhs <=> rhs >= 0) == (ExpectGreater || ExpectEqual), in testThreeWayComparisons()
66 REQUIRE_MESSAGE((lhs <=> rhs == 0) == ExpectEqual, in testThreeWayComparisons()
68 REQUIRE_MESSAGE((lhs <=> rhs != 0) == !ExpectEqual, in testThreeWayComparisons()
75 void testEqualityAndLessComparisons( const T& lhs, const T& rhs ) { in testEqualityAndLessComparisons() argument
76 testEqualityComparisons<ExpectEqual>(lhs, rhs); in testEqualityAndLessComparisons()
77 testTwoWayComparisons<ExpectEqual, ExpectLess>(lhs, rhs); in testEqualityAndLessComparisons()
79 testThreeWayComparisons<ExpectEqual, ExpectLess>(lhs, rhs); in testEqualityAndLessComparisons()
109 friend bool operator==( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {
111 return lhs.n == rhs.n;
114 friend bool operator!=( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {
116 return lhs.n != rhs.n;
119 friend bool operator<( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {
121 return lhs.n < rhs.n;
124 friend bool operator>( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {
126 return lhs.n > rhs.n;
129 friend bool operator<=( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {
131 return lhs.n <= rhs.n;
134 friend bool operator>=( const TwoWayComparable& lhs, const TwoWayComparable& rhs ) {
136 return lhs.n >= rhs.n;
194 friend auto operator<=>( const ThreeWayComparable& lhs, const ThreeWayComparable& rhs ) {
196 return lhs.n <=> rhs.n;
221 … friend auto operator<=>( const ThreeWayComparableOnly& lhs, const ThreeWayComparableOnly& rhs ) {
222 return lhs.n <=> rhs.n;
224 friend bool operator==( const ThreeWayComparableOnly& lhs, const ThreeWayComparableOnly& rhs ) {
225 return lhs.n == rhs.n;
237 friend bool operator<( const LessComparableOnly& lhs, const LessComparableOnly& rhs ) {
238 return lhs.n < rhs.n;
240 friend bool operator==( const LessComparableOnly& lhs, const LessComparableOnly& rhs ) {
241 return lhs.n == rhs.n;