File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
firebase-database/src/test/java/com/google/firebase/database/util
firebase-firestore/src/testUtil/java/com/google/firebase/firestore/testutil Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ private void testNullCompare(Object obj) {
180
180
if (comparator == null ) {
181
181
try {
182
182
compare (obj , null );
183
- assert_ ().fail ("Expected NullPointerException in %s.compare(null)" , obj );
183
+ assert_ ().withMessage ("Expected NullPointerException in %s.compare(null)" , obj ). fail ( );
184
184
} catch (NullPointerException expected ) {
185
185
// TODO: Consider accepting JavaScriptException under GWT
186
186
}
@@ -192,7 +192,9 @@ private void testClassCast(Object obj) {
192
192
if (comparator == null ) {
193
193
try {
194
194
compare (obj , ICanNotBeCompared .INSTANCE );
195
- assert_ ().fail ("Expected ClassCastException in %s.compareTo(otherObject)" , obj );
195
+ assert_ ()
196
+ .withMessage ("Expected ClassCastException in %s.compareTo(otherObject)" , obj )
197
+ .fail ();
196
198
} catch (ClassCastException expected ) {
197
199
}
198
200
}
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ private void testNullCompare(Object obj) {
185
185
if (comparator == null ) {
186
186
try {
187
187
compare (obj , null );
188
- assert_ ().fail ("Expected NullPointerException in %s.compare(null)" , obj );
188
+ assert_ ().withMessage ("Expected NullPointerException in %s.compare(null)" , obj ). fail ( );
189
189
} catch (NullPointerException expected ) {
190
190
// TODO(cpovirk): Consider accepting JavaScriptException under GWT
191
191
}
@@ -196,7 +196,9 @@ private void testClassCast(Object obj) {
196
196
if (comparator == null ) {
197
197
try {
198
198
compare (obj , ICanNotBeCompared .INSTANCE );
199
- assert_ ().fail ("Expected ClassCastException in %s.compareTo(otherObject)" , obj );
199
+ assert_ ()
200
+ .withMessage ("Expected ClassCastException in %s.compareTo(otherObject)" , obj )
201
+ .fail ();
200
202
} catch (ClassCastException expected ) {
201
203
}
202
204
}
You can’t perform that action at this time.
0 commit comments