Skip to content

Commit

Permalink
Grains: Fixed canonical data to have standard error indicator (#1322)
Browse files Browse the repository at this point in the history
* Grains: Fixed canonical data to have standard error indicator

* issue 1309: Updated comments to reflect canonical error messages
  • Loading branch information
sdublish authored and rpottsoh committed Sep 13, 2018
1 parent db547e6 commit 2ec42ab
Showing 1 changed file with 4 additions and 5 deletions.
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

0 comments on commit 2ec42ab

Please sign in to comment.