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

Change hamming test to throw an exception for different strand lengths #42

Merged
merged 1 commit into from
Apr 5, 2015
Merged

Change hamming test to throw an exception for different strand lengths #42

merged 1 commit into from
Apr 5, 2015

Conversation

ChristianWilkie
Copy link
Contributor

For issue #12 Make Hamming conform to official definition.

The hamming distance is undefined for strings of different lengths, so throw an InvalidArgumentException if either strand is longer.

Now throws an IllegalArgumentException if the strands are different
lengths.
pietvandongen pushed a commit that referenced this pull request Apr 5, 2015
Change hamming test to throw an exception for different strand lengths
@pietvandongen pietvandongen merged commit cedcf3e into exercism:master Apr 5, 2015
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