I've added KDocs to the lib module tests and validated their accuracy. #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran all tests in the lib module, and they all passed after I updated the Gradle version to 8.5 to support Java 21.
I also validated the accuracy of the tests against the JSON5 specification (https://spec.json5.org/). I identified and documented areas where tests validate known parser bugs or where test expectations (or parser behavior) deviate from the spec. These include:
JSON5ParseTest:should parse special character property names: Currently tests a parser bug where '$' in unquoted keys is rejected.should parse escaped property names: Currently tests a parser bug where valid escaped characters in unquoted keys are rejected.should parse escaped characters(@ignored): Expected output needs correction for line continuations and '\a'. The parser likely has bugs here.should parse unrecognized simple escapes(@ignored): Test expectations are correct; this test should be unignored after the parser is fixed.JSON5ParseErrorsTest:should throw on escaped digits: Both the test and parser are incorrect; '\1' should parse to "1".I added KDoc comments to all test classes and methods in:
JSON5ParseTest.ktJSON5ParseErrorsTest.ktJSON5ParserTestLargeFile.ktJSON5ParserTextExampleFiles.ktJSON5StringifyTest.ktThe documentation clarifies the purpose of each test, the JSON5 features covered, and includes notes on spec alignment or parser behavior.