Skip to content

Commit

Permalink
Merge pull request #76 from johnjaylward/WriteJavadocUpdate
Browse files Browse the repository at this point in the history
Update test for issue stleary/JSON-java#356
  • Loading branch information
stleary authored Jul 15, 2017
2 parents 974a5f7 + aa562b5 commit 1aeadd1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/test/java/org/json/junit/JSONObjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1622,10 +1622,13 @@ public void jsonObjectToStringIndent() {
" ]\n" +
"}";
JSONObject jsonObject = new JSONObject(jsonObject0Str);
assertEquals(jsonObject0Str, jsonObject.toString());
assertEquals(jsonObject0Str, jsonObject.toString(0));
assertEquals(jsonObject1Str, jsonObject.toString(1));
assertEquals(jsonObject4Str, jsonObject.toString(4));
assertEquals("toString()",jsonObject0Str, jsonObject.toString());
assertEquals("toString(0)",jsonObject0Str, jsonObject.toString(0));
assertEquals("toString(1)",jsonObject1Str, jsonObject.toString(1));
assertEquals("toString(4)",jsonObject4Str, jsonObject.toString(4));

JSONObject jo = new JSONObject().put("TABLE", new JSONObject().put("yhoo", new JSONObject()));
assertEquals("toString(2)","{\"TABLE\": {\"yhoo\": {}}}", jo.toString(2));
}

/**
Expand Down

0 comments on commit 1aeadd1

Please sign in to comment.