-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/jsonschema: verify result is concrete in external tests
The result of unifying a JSON Schema with a concrete instance should itself be concrete, but that's not necessarily the case. Verify this by checking for concreteness in the test. The test statistics before were: ``` v2: schema extract (pass / total): 971 / 1637 = 59.3% tests (pass / total): 3032 / 7175 = 42.3% tests on extracted schemas (pass / total): 3032 / 3542 = 85.6% v3: schema extract (pass / total): 971 / 1637 = 59.3% tests (pass / total): 3014 / 7175 = 42.0% tests on extracted schemas (pass / total): 3014 / 3542 = 85.1% ``` With this change applied they are: ``` v2: schema extract (pass / total): 971 / 1637 = 59.3% tests (pass / total): 3081 / 7175 = 42.9% tests on extracted schemas (pass / total): 3081 / 3542 = 87.0% v3: schema extract (pass / total): 971 / 1637 = 59.3% tests (pass / total): 3063 / 7175 = 42.7% tests on extracted schemas (pass / total): 3063 / 3542 = 86.5% ``` That is, overall, 49 more tests pass on both v2 and v3. This is (almost?) entirely down to the fact that with out concreteness checking enabled, we won't fail a test that is checking for a required field that isn't present. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: I6c2a8cceb454826aa02c32525070d093160fec9e Dispatch-Trailer: {"type":"trybot","CL":1200522,"patchset":1,"ref":"refs/changes/22/1200522/1","targetBranch":"master"}
- Loading branch information
Showing
30 changed files
with
294 additions
and
490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.