Skip to content

Executing JSONTestSuite parsing tests cases #24

Closed
joeslice wants to merge 4 commits intokson-org:mainfrom
joeslice:jstontestsuite
Closed

Executing JSONTestSuite parsing tests cases #24
joeslice wants to merge 4 commits intokson-org:mainfrom
joeslice:jstontestsuite

Conversation

@joeslice
Copy link
Contributor

@joeslice joeslice commented Nov 22, 2021

Importing and executing tests from nst/JSONTestSuite
to understand whether KSON is JSON-compatible. See details in readme for
more information.

Note: Initial sync is revision d64aefb.

In combination with issues #21, #22, and #23, closes #19.

Using an ascii dash `-` instead of endash (\u2013)
allows for more obvious manipulation/grepping later.
Allowing parser to retutn a nullable `KsonRoot` ensures
that unparseable data is not used to create a partial AST.
Importing tests from [nst/JSONTestSuite](https://github.com/nst/JSONTestSuite)
to understand whether KSON is JSON-compatible. See details in readme for
more information

Note: Initial sync is revision d64aefb.
Using [nst/JSONTestSuite](https://github.com/nst/JSONTestSuite) provided
test cases, this framework allows reporting of whether we are compying with
the edge cases defined in the upstream project.

Note that many of the test cases are "skipped", and follow on enablement of
these tests is part of #21, #22, and #23.
@joeslice
Copy link
Contributor Author

Notable TODOs at the time of initial PR:

  • Multiplatform support is currently unimplemented (TODO implementations in readResourceAsString for js and native platforms
  • It is desirable to replace the commit "Include JSONTestSuite parsing test cases" with an import of this source at build time. Specific options include: a) importing these tests as a dependency if that project exports a built unit, b) import these as part of a simple gradle script, or c) investigating source dependencies in gradle

@dmarcotte
Copy link
Contributor

Thanks @joeslice! This helps a ton towards this goal.

Also note I that 7585e7b which used to be part of this pull was merged in #25 (it was a nice, stand-alone change, so I thought I'd whisk it in sooner than later)

@dmarcotte
Copy link
Contributor

Built on this in #26 and merged over there. Thanks a ton for all the help here, @joeslice! I super appreciate it.

@dmarcotte dmarcotte closed this Dec 17, 2021
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.

Use JSONTestSuite to test our parser functionality

2 participants