Skip to content
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

Grains: Fixed canonical data to have standard error indicator #1322

Merged
merged 2 commits into from
Sep 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions exercises/grains/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"exercise": "grains",
"version": "1.1.0",
"version": "1.2.0",
"comments": [
"The final tests of square test error conditions",
"The expectation for these tests is -1, indicating an error",
"In these cases you should expect an error as is idiomatic for your language"
],
"cases": [
Expand Down Expand Up @@ -72,23 +71,23 @@
"input": {
"square": 0
},
"expected": -1
"expected": {"error": "square must be between 1 and 64"}
},
{
"description": "negative square raises an exception",
"property": "square",
"input": {
"square": -1
},
"expected": -1
"expected": {"error": "square must be between 1 and 64"}
},
{
"description": "square greater than 64 raises an exception",
"property": "square",
"input": {
"square": 65
},
"expected": -1
"expected": {"error": "square must be between 1 and 64"}
}
]
},
Expand Down