Skip to content

Commit

Permalink
Merge pull request #551 from petertseng/readme-desc
Browse files Browse the repository at this point in the history
README: bring expectation of canonical-data.json values (description, errors, no msg) up-to-date
  • Loading branch information
petertseng authored Feb 17, 2017
2 parents b574e74 + 9afe4c1 commit c4e23d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ variations.

Each test case has the the following keys:
- description: which will be used to name each generated test
- The description should not simply explain **what** each case is (that is redundant information)
- The description should explain **why** each case is there. For example, what kinds of implementation mistakes might this case help us find?
- 'variable names': one or more variable names with values which will be passed to the solution method
- expected: the expected result (this would be -1 when we expect an exception)
- msg: a nice message for the failing case
- expected: the expected result
- if the input is valid but there is no result for the input, the value at `"expected"` should be `null`.
- if an error is expected (because the input is invalid, or any other reason), the value at `"expected"` should be an object containing exactly one property, `"error"`, whose value is a string.
- The string should explain why the error would occur.
- A particular track's implementation of the exercise **need not** necessarily check that the error includes that exact string as the cause, depending on what is idiomatic in the language (it may not be idiomatic to check strings for error messages).

## Automated Tests

Expand Down

0 comments on commit c4e23d0

Please sign in to comment.