Skip to content

Grains: Add canonical-data.json file #420

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 2 commits into from
Oct 24, 2016

Conversation

IanWhitney
Copy link
Contributor

Current implementations of this exercise are all nearly identical, so
creating a canonical test set was just a matter of documenting the
existing tests.

Some languages do not include the error-handling tests, but I think they
are valuable to include as the boundaries they test are part of the
problem domain.

Current implementations of this exercise are all nearly identical, so
creating a canonical test set was just a matter of documenting the
existing tests.

Some languages do not include the error-handling tests, but I think they
are valuable to include as the boundaries they test are part of the
problem domain.
"description": "square greater than 64 raises an execption",
"input": 65,
"expected": -1
},
Copy link
Contributor

Choose a reason for hiding this comment

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

This trailing comma is causing the linter to complain.

IanWhitney pushed a commit to IanWhitney/xrust that referenced this pull request Oct 22, 2016
Follows the standard test suite, which is currently waiting for merge.

exercism/problem-specifications#420

I did not include the test of square -1 since that would require the
function signature to be `i32`.

Placement is at the end of the "Introduction" section. It introduces a
couple of concepts that may be new,

- declaring number types
- panic & should_panic

I thought it would be nice to get some exposure to `panic` before
introducing `result` in the Hamming exercise.
@IanWhitney IanWhitney merged commit ca0c64f into exercism:master Oct 24, 2016
@IanWhitney IanWhitney deleted the grains_canonical_data branch October 24, 2016 00:38
IanWhitney added a commit to exercism/rust that referenced this pull request Oct 25, 2016
* Implement grains

Follows the standard test suite, which is currently waiting for merge.

exercism/problem-specifications#420

I did not include the test of square -1 since that would require the
function signature to be `i32`.

Placement is at the end of the "Introduction" section. It introduces a
couple of concepts that may be new,

- declaring number types
- panic & should_panic

I thought it would be nice to get some exposure to `panic` before
introducing `result` in the Hamming exercise.

Re: stub src/lib.rs file

This is pretty early in the track, so signatures can be handy. And not
getting a bunch of compilation errors is also nice. I don't think that
this stub forces any particular implementation, though the setting of
type of `s` to `u32` does help the students over a bit of type-casting
hassle.
@petertseng
Copy link
Member

emcoding pushed a commit that referenced this pull request Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants