Skip to content
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

Tests for JSON Pointers #46

Merged
merged 8 commits into from
May 14, 2016
Merged

Tests for JSON Pointers #46

merged 8 commits into from
May 14, 2016

Conversation

erosb
Copy link
Contributor

@erosb erosb commented Apr 26, 2016

Tests for this PR: stleary/JSON-java#222

@stleary
Copy link
Owner

stleary commented Apr 29, 2016

Sorry, will be some delay, having problems getting coverage to work in my dev environment.

@stleary
Copy link
Owner

stleary commented Apr 29, 2016

Thank goodness for dev environments on multiple boxes. Coverage is fine, thanks for taking the time to do these tests. You may, if you want, add testing for JSONObject.query() and JSONArray.query(), otherwise I can add them. JunitTestSuite.java should have JSONPointer.class added to the SuiteClasses annotation. Otherwise all looks OK so far.

@johnjaylward
Copy link
Contributor

Maybe just add a test for this:

Builder b = JSONPointer.builder().append("key1");
JSONPointer jp1 = b.build();
b.append("key2");
JSONPointer jp2 = b.build();
if(jp1.toString().equals(jp2.toString()){
    throw new Exception("Oops, my pointers are sharing a backing array");
}

@stleary stleary merged commit 46044bf into stleary:master May 14, 2016
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.

3 participants