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

zebra-puzzle: add canonical data #947

Merged
merged 3 commits into from
Oct 26, 2017
Merged
Changes from 1 commit
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
16 changes: 16 additions & 0 deletions exercises/zebra-puzzle/canonical-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"exercise": "zebra-puzzle",
"version": "1.0.0",
"cases": [
{
"description": "resident who drinks water",
"property": "nationality",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the properties be: 'drinks_water' and 'owns_zebra' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking that this would be the return "type" of the expected value. If we do adjust the exercise to use different clues, then this would be a good way to know what data "type" the exercise would be testing for. Or would this not be a good use of the "property" tag? We could alternatively use "nationality", etc. as the key instead of "expected".

Copy link
Contributor

Choose a reason for hiding this comment

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

But we're always asking for nationality. How does the test generator know whose nationality we want?

If the exercise changes, the test data will also need to change so I would not worry about future proofing at this stage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I understand now. And yes, good point. Changing now.

"expected": "Norwegian"
},
{
"description": "resident who owns zebra",
"property": "nationality",
"expected": "Japanese"
}
]
}