-
-
Notifications
You must be signed in to change notification settings - Fork 554
hamming: remove redundant test cases #1412
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this PR close the issue? Just getting up, need coffee, what I can see on my phone looks good.
Absolutely. I've updated the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM!
"expected": 1 | ||
}, | ||
{ | ||
"description": "same nucleotides in different positions", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is interesting. It is clearly catered toward certain specific implementations, such as those that simply compare the frequencies of each character.
Luckily, such an implementation would also give a wrong answer long different strands
case, giving 4 instead of 9. So, removing this case doesn't remove any coverage, and it is okay to remove it.
The only possible reason to keep it would be to explicitly signal to students who have written such an implementation that trouble is brewing ahead, in a smaller more manageable step.
In deciding this, consider the likelihood of a student writing such an implementation and the value (if any!) of this test to such a student.
Please don't wait for further feedback from me before merging this. My job is only to make sure that this information is considered, not to provide an opinion (I have none and do not care in the least what decision is made here).
"expected": 2 | ||
}, | ||
{ | ||
"description": "non-unique character in first strand", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have never understood what kinds of implementations this case was meant to detect, and #51 which added it did not provide the rationale.
However, I suppose in its original form (AGA
vs AGG
), it would find implementations that would checked whether the set of letters is the same (for example, here, declare that the two strings have distance 0 because both of them contain at least one A and at least one G).
If that is so, #953 lost that ability. Since nobody has come forth in the year that it's been gone and requested that it be changed back, that's a fine indication that that was of no concern to anyone, and thus should be removed.
This references exercism/problem-specifications#1412.
Closes #1403