stleary / JSON-Java-unit-test

Junit test harness to validate the JSON-Java GitHub project code.
Apache License 2.0
28 stars 45 forks source link

Unit tests for constructor JSONObject(JSONTokener) #78

Closed migueltt closed 7 years ago

migueltt commented 7 years ago

Constructor JSONObject(JSONTokener) has been updated to provide a more meaningful error message that includes actual error location when errors are found when a duplicate key is found.

migueltt commented 7 years ago

JUnit test case JSONObjectTest.jsonObjectParsingErrors() updated - error messages including positions changed (constructor JSONObject(JSONTokener) now backs one token prior to raise JSONException.

migueltt commented 7 years ago

JUnit test cases updated for JSONObjectTest.jsonObjectParsingErrors() - adjust error position due to removal of JSONTokener.back() in constructor JSONObject(JSONTokener).

stleary commented 7 years ago

Good test coverage.