Skip to content

pascals-triangle: implement error object #1336

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

Merged
merged 1 commit into from
Sep 24, 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
6 changes: 3 additions & 3 deletions exercises/pascals-triangle/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"exercise": "pascals-triangle",
"version": "1.3.0",
"version": "1.4.0",
"comments": [
"Expectations are represented here as an array of arrays.",
"How you represent this idiomatically in your language is up to you.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment needs fixing.

"An expectation of -1 indicates some sort of failure should occur"
"An expectation of 'error' indicates some sort of failure should occur."
],
"cases": [
{
Expand Down Expand Up @@ -80,7 +80,7 @@
"input": {
"count": -1
},
"expected": -1
"expected": {"error": "count must be positive"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of scope for this PR, but (opinion) this test should be removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Insti your meaning that, in your opinion, this case should be removed because it deals with invalid input? I agree with that opinion. If I am understanding you correctly I will leave this as it is. Another PR can be opened to to remove this case.

Copy link
Contributor

Choose a reason for hiding this comment

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

@rpottsoh you understand me and I agree with you. 😄

}
]
}
Expand Down