Skip to content

Tests for JSON Pointers - #46

Merged
stleary merged 8 commits into
stleary:masterfrom
erosb:master
May 14, 2016
Merged

stleary merged 8 commits into
stleary:masterfrom
erosb:master

Conversation

@erosb

@erosb erosb commented Apr 26, 2016

Copy link
Copy Markdown
Contributor

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

@stleary

stleary commented Apr 29, 2016

Copy link
Copy Markdown
Owner

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

@stleary

stleary commented Apr 29, 2016

Copy link
Copy Markdown
Owner

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
Copy Markdown
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