Commit Graph

9 Commits

Author SHA1 Message Date
John J. Aylward 2867aaa8c8 Updates test cases to support new optFloat and optNumber 2017-05-17 12:33:59 -04:00
John J. Aylward 9df5d34bbe * Update link in the README to the main JSON-Java repo
* Cleans up some warnings
* Adds new test for bug https://github.com/stleary/JSON-java/issues/332
* Adds some resource handling for string writers using pre-java1.7
support. I know StringWriters don't need a close method called, but the
tests should still handle their resources properly.
2017-04-27 12:39:42 -04:00
Sean Leary c400de3cfe Merge pull request #53 from run2000/master
valueToString() and write() tests
2016-08-10 21:55:33 -05:00
John J. Aylward a2c311527b Updates tests to include all opt methods and verify for missing keys. 2016-08-09 15:54:06 -04:00
Nicholas Cull 1246e12827 Factor out Writer from Appendable tests. 2016-07-24 19:39:52 +10:00
Nicholas Cull ae77b5cd83 Tests for deep copy and mutability of toList() and toMap().
Both toMap() and toList() return deep copies, which are also mutable. That is, any changes to the JSONObject or JSONArray do not affect the newly create Map or List, and vice-versa. The resulting objects can be altered.
2016-07-23 22:51:50 +10:00
Nicholas Cull 72c2b911bf Tests for toString(), write(), toList(), and toMap().
Explicitly test variations of toString() and write() for different indent levels, and different method overloads. Also create some tests for the new toList() and toMap() methods for coverage improvements to JSONArray and JSONObject.
2016-07-23 22:33:19 +10:00
John J. Aylward c2de224711 Verify opt method conversions for JSONArray and JSONObject 2016-07-08 16:58:58 -04:00
John J. Aylward 80f9e48e64 Moves src folder to simplify build.gradle configuration. If JSON-Java source is merged, it's src fold would now be src/main/java/org.json/ instead of src/main/org.json as well. 2016-06-16 12:20:54 -04:00