-
-
Notifications
You must be signed in to change notification settings - Fork 10
[perl] Shared error and expression tests #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In order to match the expected error texts, change existing failure tests and remove tests for "empty tags" after discussion with @aslakhellesoy as to whether it's desirable that the tag-expressions library has knowledge of tokens being tags (it's not).
|
@aslakhellesoy The Perl implementation has a different internal representation, which causes differences in the "parsing.yml" output: the "and" and "or" operators are "lispy" in the sense that they accept as many operands as you provide, resulting in: Although I do see the point in the |
Fix the "empty string" equals 'constant true' issue found by studying parsing.yml. Also use infix stringification to closer resemble the expected test output (but not fully: our 'or' accepts more than 2 operands).
|
Actually, I just figured out how to compensate the difference without changing the internal representation. |
aslakhellesoy
left a comment
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.
Very nice @ehuelsmann! These shared acceptance tests seem to come in handy :-)
a6d8fd3 to
ce8c6e9
Compare
Absolutely. They give me the confidence that we present the same API across implementations. |
Description
Refactor the code to comply with the shared tests for expressions and errors.
Motivation & context
Consistency across implementations.
Type of change
Checklist: