Matthew Dempsky has uploaded a new change for review.

  https://gwt-review.googlesource.com/1962


Change subject: Add explicit assertNonNull() statements to JSONTest for cleaner test failures.
......................................................................

Add explicit assertNonNull() statements to JSONTest for cleaner test
failures.

Change-Id: I283419f3665cec632a438b4a68cc946c09e4f0ac
---
M user/test/com/google/gwt/json/client/JSONTest.java
1 file changed, 5 insertions(+), 0 deletions(-)



diff --git a/user/test/com/google/gwt/json/client/JSONTest.java b/user/test/com/google/gwt/json/client/JSONTest.java
index 66e692f..dd6440d 100644
--- a/user/test/com/google/gwt/json/client/JSONTest.java
+++ b/user/test/com/google/gwt/json/client/JSONTest.java
@@ -73,24 +73,29 @@
     if (expected.isArray() != null) {
       JSONArray expArray = expected.isArray();
       JSONArray actArray = actual.isArray();
+      assertNonNull(actArray);
       assertJSONArrayEquals(expArray, actArray);
     } else if (expected.isBoolean() != null) {
       JSONBoolean expBool = expected.isBoolean();
       JSONBoolean actBool = actual.isBoolean();
+      assertNonNull(actBool);
       assertEquals(expBool.booleanValue(), actBool.booleanValue());
     } else if (expected.isNull() != null) {
       assertNotNull(actual.isNull());
     } else if (expected.isNumber() != null) {
       JSONNumber expNum = expected.isNumber();
       JSONNumber actNum = actual.isNumber();
+      assertNonNull(actNum);
       assertEquals(expNum.doubleValue(), actNum.doubleValue());
     } else if (expected.isObject() != null) {
       JSONObject expObj = expected.isObject();
       JSONObject actObj = actual.isObject();
+      assertNonNull(actObj);
       assertJSONObjectEquals(expObj, actObj);
     } else if (expected.isString() != null) {
       JSONString expStr = expected.isString();
       JSONString actStr = actual.isString();
+      assertNonNull(actStr);
       assertEquals(expStr.stringValue(), actStr.stringValue());
     } else {
       fail("Unknown JSONValue " + expected);

--
To view, visit https://gwt-review.googlesource.com/1962
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I283419f3665cec632a438b4a68cc946c09e4f0ac
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Matthew Dempsky <mdemp...@google.com>

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to