-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update the test schema to make expErrors "array" only #993
Comments
I am wrong, there are several files with But all use The one exception with Which I think is cleaner if we specify why the failure, not just |
I support this. I think we have enough tests now to say that we're not getting much value from |
If we are into simplifying this area, at this point I think we can also make the expected errors simple strings. So instead of: "expErrors": [{ "type": "unknown-function" }, { "type": "bad-selector" }] we can say: "expErrors": [ "unknown-function", "bad-selector" ] Less verbose, and the exact same info. It does not mean that implementations are forced to represent the errors as strings instead of being typed. We already forced C/C++/Java to do all kind of "massaging" of the data loaded from json. It would be easy for an implementation to change a test from:
to:
|
Right now that is an array or a boolean:
Why:
The description already says "If expErrors is either absent or empty, the message must be formatted without errors". That covers the possible
expErrors = false
.So we already have 2 ways to say "nothing fails", we don't need 3 ways.
And if we expect an error, then we should say what that error is, not just say "yes, we expect errors" (
expErrors = true
).The only use of
expErrors
as boolean right now is intest/tests/functions/currency.json
, and all instances are"expErrors": false
.Which is not needed (as per description missing
expErrors
means no errors).And that is what we do in all other tests, we don't specify
expErrors
when none are expected.The text was updated successfully, but these errors were encountered: