Skip to content

Commit d75a96a

Browse files
committed
95.9% coverage
1 parent e5c01e4 commit d75a96a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

JSONArrayTest.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,18 @@ public void toJSONObject() {
450450
JSONArray jsonArray = new JSONArray();
451451
assertTrue("toJSONObject should return null",
452452
null == jsonArray.toJSONObject(names));
453-
453+
}
454+
455+
@Test
456+
public void objectArrayVsIsArray() {
457+
String expectedStr =
458+
"["+
459+
"1,2,3,4,5,6,7"+
460+
"]";
461+
int[] myInts = { 1, 2, 3, 4, 5, 6, 7 };
462+
Object myObject = myInts;
463+
JSONArray jsonArray = new JSONArray(myObject);
464+
JSONArray expectedJsonArray = new JSONArray(expectedStr);
465+
Util.compareActualVsExpectedJsonArrays(jsonArray, expectedJsonArray);
454466
}
455467
}

0 commit comments

Comments
 (0)