Skip to content

Commit 1aeadd1

Browse files
authored
Merge pull request #76 from johnjaylward/WriteJavadocUpdate
Update test for issue stleary/JSON-java#356
2 parents 974a5f7 + aa562b5 commit 1aeadd1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/test/java/org/json/junit/JSONObjectTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,10 +1622,13 @@ public void jsonObjectToStringIndent() {
16221622
" ]\n" +
16231623
"}";
16241624
JSONObject jsonObject = new JSONObject(jsonObject0Str);
1625-
assertEquals(jsonObject0Str, jsonObject.toString());
1626-
assertEquals(jsonObject0Str, jsonObject.toString(0));
1627-
assertEquals(jsonObject1Str, jsonObject.toString(1));
1628-
assertEquals(jsonObject4Str, jsonObject.toString(4));
1625+
assertEquals("toString()",jsonObject0Str, jsonObject.toString());
1626+
assertEquals("toString(0)",jsonObject0Str, jsonObject.toString(0));
1627+
assertEquals("toString(1)",jsonObject1Str, jsonObject.toString(1));
1628+
assertEquals("toString(4)",jsonObject4Str, jsonObject.toString(4));
1629+
1630+
JSONObject jo = new JSONObject().put("TABLE", new JSONObject().put("yhoo", new JSONObject()));
1631+
assertEquals("toString(2)","{\"TABLE\": {\"yhoo\": {}}}", jo.toString(2));
16291632
}
16301633

16311634
/**

0 commit comments

Comments
 (0)