16
16
17
17
// Copyright 2009 Google Inc. All Rights Reserved.
18
18
19
- import static com .google .common .truth .Truth .assertThat ;
20
19
import static com .google .common .truth .Truth .assertWithMessage ;
21
20
import static com .google .common .truth .Truth .assert_ ;
22
21
@@ -155,8 +154,8 @@ private void doTestEquivalanceGroupOrdering() {
155
154
testClassCast (reference );
156
155
for (int otherIndex = 0 ; otherIndex < equalityGroups .size (); otherIndex ++) {
157
156
for (Object other : equalityGroups .get (otherIndex )) {
158
- assertThat ( Integer . signum ( compare (reference , other )) )
159
- .named ( " compare(%s, %s)" , reference , other )
157
+ assertWithMessage ( " compare(%s, %s)" , reference , other )
158
+ .that ( Integer . signum ( compare (reference , other )) )
160
159
.isEqualTo (Integer .signum (Ints .compare (referenceIndex , otherIndex )));
161
160
}
162
161
}
@@ -172,8 +171,8 @@ private void doTestEqualsCompatibility() {
172
171
assertWithMessage (
173
172
"Testing equals() for compatibility with compare()/compareTo(), "
174
173
+ "add a call to doNotRequireEqualsCompatibility() if this is not required" )
174
+ .withMessage ("%s.equals(%s)" , reference , other )
175
175
.that (reference .equals (other ))
176
- .named ("%s.equals(%s)" , reference , other )
177
176
.isEqualTo (compare (reference , other ) == 0 );
178
177
}
179
178
}
0 commit comments