-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
wordy: implement "error" object #1334
Conversation
exercises/wordy/canonical-data.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"exercise": "wordy", | |||
"version": "1.1.0", | |||
"version": "1.2.0", | |||
"comments": [ | |||
"The tests that expect 'false' should be implemented to raise", | |||
"an error, or indicate a failure. Implement this in a way that", |
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.
This comment should probably be modified.
exercises/wordy/canonical-data.json
Outdated
@@ -125,15 +125,15 @@ | |||
"input": { | |||
"question": "What is 52 cubed?" | |||
}, | |||
"expected": false | |||
"expected": {"error": "Invalid Problem"} |
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.
Maybe change this to Invalid problem
(lowercase p)?
exercises/wordy/canonical-data.json
Outdated
}, | ||
{ | ||
"description": "Non math question", | ||
"property": "answer", | ||
"input": { | ||
"question": "Who is the President of the United States?" | ||
}, | ||
"expected": false | ||
"expected": {"error": "Invalid Problem"} |
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.
Maybe change this to Invalid problem
(lowercase p)?
exercises/wordy/canonical-data.json
Outdated
@@ -125,15 +125,15 @@ | |||
"input": { | |||
"question": "What is 52 cubed?" | |||
}, | |||
"expected": false | |||
"expected": {"error": "Invalid problem"} |
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.
This is OK, but the error message could probably be worded more helpfully.
per exercism#1311 proper error handling object incorporated into last two test cases. wordy: lowerCased error message 2nd word per @ErikSchierboom suggestion. wordy: reworded comment to indicate 'error' per @Insti's request. wordy: error messages more helpful.
6ad13d9
to
86d0069
Compare
per #1311 proper error handling object incorporated into last two test cases.