Skip to content

Unit tests for constructor JSONObject(JSONTokener) #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 18, 2017
Merged

Unit tests for constructor JSONObject(JSONTokener) #78

merged 6 commits into from
Aug 18, 2017

Conversation

migueltt
Copy link
Contributor

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.

Updating exception message accordingly (position -1)
@migueltt
Copy link
Contributor Author

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

`JSONTokener.back()` call removed from `JSONObject(JSONTokener)` constructor.
@migueltt
Copy link
Contributor Author

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

@stleary
Copy link
Owner

stleary commented Aug 18, 2017

Good test coverage.

@stleary stleary merged commit d0e2cf4 into stleary:master Aug 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants