File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/test/java/org/json/junit Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff 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 /**
You can’t perform that action at this time.
0 commit comments