-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using cannonical conformance tests now
- Loading branch information
Showing
84 changed files
with
346 additions
and
569 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "spec/fixtures/conformance"] | ||
path = spec/fixtures/conformance | ||
url = git://github.com/lloyd/JSONSelectTests.git |
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.
6f05750
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are you finding the broken out conformance tests? How do you feel about the negative tests, those where the .output file contains
Error:
. Is it useful that actual error messages emitted by the javascript implementation occur in test files, or annoying?6f05750
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they are great. The negative tests are less useful but it's easy enough to map the JS error messages to Ruby error messages. Maybe it's a good idea to define standardized error numbers. Like this the tests are not coupled to the JS implementation.
6f05750
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I care to regulate how errors are reported in other implementations... But you are the only other implementor at this point, so basically I'm all ears.
One thing I was thinking is to change the extension of negative tests to
.error
(from.output
). This way crazy over zealous implementations could copy the ref impl's js errors verbatim, while others could just check for the existence of the error file to determine whether or not an error was expected.6f05750
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think changing the extension of the negative tests to
.error
is better as it makes the test type more explicit.Also I think that negative tests like this one are not in the right place. I feel that the level_{1,2,3} groups should contain tests about the value-selecting logic not about the parser. A forth group of tests, the parser tests (or maybe level_0), might contain the tests for the parser details (like white space, precedence, parse errors, etc.).
6f05750
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'll make the change to
.error
: lloyd/JSONSelectTests#1I understand the suggestion about level_0, but it would be confusing. level_{123} correspond to conformance levels. Syntax errors in level 3 language constructs have to reside somewhere that they can be filtered out by implementers building level 1 support.
One thing we could do is create subdirectories under the level_{123} directories... perhaps
syntax
andmatching
directories. But then that gets into a pretty complicated structure for a fairly simple collection of stuff. what do you think?6f05750
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Let's just keep the level_0 stuff as it is and when things grow out of controle (which would presumably be in the distant future) we can still add more structure.