Skip to content

Hamming: Make error checking identical to other tests#169

Merged
IanWhitney merged 1 commit intoexercism:masterfrom
jonasbb:hamming-test
Jul 13, 2016
Merged

Hamming: Make error checking identical to other tests#169
IanWhitney merged 1 commit intoexercism:masterfrom
jonasbb:hamming-test

Conversation

@jonasbb
Copy link
Copy Markdown
Contributor

@jonasbb jonasbb commented Jul 12, 2016

I noticed this after @petertseng mentioned the error handling in #147.
The Hamming exercise performs error checking with comparison to Err(.). Most tests (Nucleotide Codons, Queen Attack, Wordy) only check with is_err(). The exceptions are Circular Buffer and Forth, but they use more complex error reporting with different conditions and provide an Error enum with the correct return values.

Because there is only one error conditions I suggest to remove the fixed value and only check with is_err().

@jonasbb jonasbb changed the title Make error checking identical to other tests Hamming: Make error checking identical to other tests Jul 12, 2016
@IanWhitney
Copy link
Copy Markdown
Contributor

Thanks. I like it.

@IanWhitney IanWhitney closed this Jul 13, 2016
@IanWhitney IanWhitney reopened this Jul 13, 2016
@IanWhitney IanWhitney merged commit 4021063 into exercism:master Jul 13, 2016
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.

2 participants