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) {
180180 if (comparator == null ) {
181181 try {
182182 compare (obj , null );
183- assert_ ().fail ("Expected NullPointerException in %s.compare(null)" , obj );
183+ assert_ ().withMessage ("Expected NullPointerException in %s.compare(null)" , obj ). fail ( );
184184 } catch (NullPointerException expected ) {
185185 // TODO: Consider accepting JavaScriptException under GWT
186186 }
@@ -192,7 +192,9 @@ private void testClassCast(Object obj) {
192192 if (comparator == null ) {
193193 try {
194194 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 ();
196198 } catch (ClassCastException expected ) {
197199 }
198200 }
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ private void testNullCompare(Object obj) {
185185 if (comparator == null ) {
186186 try {
187187 compare (obj , null );
188- assert_ ().fail ("Expected NullPointerException in %s.compare(null)" , obj );
188+ assert_ ().withMessage ("Expected NullPointerException in %s.compare(null)" , obj ). fail ( );
189189 } catch (NullPointerException expected ) {
190190 // TODO(cpovirk): Consider accepting JavaScriptException under GWT
191191 }
@@ -196,7 +196,9 @@ private void testClassCast(Object obj) {
196196 if (comparator == null ) {
197197 try {
198198 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 ();
200202 } catch (ClassCastException expected ) {
201203 }
202204 }
You can’t perform that action at this time.
0 commit comments