From d75a96ae59c723fbac857443b750b32cb8856006 Mon Sep 17 00:00:00 2001 From: stleary Date: Tue, 14 Apr 2015 01:12:08 -0500 Subject: [PATCH] 95.9% coverage --- JSONArrayTest.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/JSONArrayTest.java b/JSONArrayTest.java index 2799a04..78b194e 100644 --- a/JSONArrayTest.java +++ b/JSONArrayTest.java @@ -450,6 +450,18 @@ public class JSONArrayTest { JSONArray jsonArray = new JSONArray(); assertTrue("toJSONObject should return null", null == jsonArray.toJSONObject(names)); - + } + + @Test + public void objectArrayVsIsArray() { + String expectedStr = + "["+ + "1,2,3,4,5,6,7"+ + "]"; + int[] myInts = { 1, 2, 3, 4, 5, 6, 7 }; + Object myObject = myInts; + JSONArray jsonArray = new JSONArray(myObject); + JSONArray expectedJsonArray = new JSONArray(expectedStr); + Util.compareActualVsExpectedJsonArrays(jsonArray, expectedJsonArray); } }