Skip to content

Add unit tests for literal tilde tokens in JSONPointer - #1088

Merged
stleary merged 1 commit into
stleary:masterfrom
fahadaldajani92:test/jsonpointer-issue-1081
Oct 11, 2026
Merged

stleary merged 1 commit into
stleary:masterfrom
fahadaldajani92:test/jsonpointer-issue-1081

Conversation

@fahadaldajani92

Copy link
Copy Markdown
Contributor

Add a single regression test method covering every input in #1081: string and URI-fragment pointers for ~01 and ~00, embedded escapes in a~01b and a~00b, builder tokens ~1 and ~0, and a token-list constructor containing ~1. Distinct values for the literal and formerly selected keys make the expected behavior explicit. Arrays.asList represents the list case while retaining the project's Java 8 compatibility.

Testing: ./gradlew test --tests org.json.junit.JSONPointerTest.escapedTildeTokensSelectLiteralKeys --no-daemon --console plain and ./gradlew clean build test --no-daemon --console plain passed using Temurin 11. The full run reported 814 tests, 0 failures, 0 errors, and 6 skipped. git diff --check passed.

@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@fahadaldajani92
fahadaldajani92 marked this pull request as ready for review October 8, 2026 20:06
@stleary stleary removed the In review label Oct 11, 2026
@stleary

stleary commented Oct 11, 2026

Copy link
Copy Markdown
Owner

What problem does this code solve?
Adds unit tests for JSONPointer

Risks
None

Changes to the Existing Behavior
N/A

Changes to the API
N/A

Will this require a new release?
No

Should the documentation be updated?
No

Unit Tests
Yes, the only change is new unit tests

Refactoring
No

Review status
APPROVED

Omitting 3-day comment period since nothing production-related was touched.

@stleary
stleary merged commit 406abf8 into stleary:master Oct 11, 2026
9 checks passed
@stleary stleary changed the title test: cover literal tilde tokens in JSONPointer Add unit tests for literal tilde tokens in JSONPointer Oct 11, 2026
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