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

README: bring expectation of canonical-data.json values (description, errors, no msg) up-to-date #551

Merged
merged 3 commits into from
Feb 17, 2017
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: 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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the last proposal in #336 doesn't enforce the existence of a expected property, if it is present, it can now also 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