-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
fix pangram test for duplicate mixed-case chars #852
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Related, in the Haskell track (where I spotted this): exercism/haskell#565 |
In my review:
Please change the minor version, as https://github.com/exercism/problem-specifications#minor-version-changes |
From what I can see, the last test case is inteded to catch incorrect programs such as this, which don't take into account different-cased duplicates: ```haskell isPangram = (== 26) . length . nub . filter isAlpha ``` However the above program passed the final test as the count of distinct upper and lower case characters is 27, rather than 26. This commit changes the test text to a non-pangram that has exactly 26 distinct upper and lower case characters, which causes the above, incorrect program to fail.
rsslldnphy
force-pushed
the
pangram-test-fix
branch
from
June 26, 2017 19:25
3395101
to
571e9d8
Compare
👍, I have added a version bump to the commit. |
petertseng
approved these changes
Jun 26, 2017
stkent
approved these changes
Jun 26, 2017
Very good, thanks! |
petertseng
pushed a commit
to exercism/haskell
that referenced
this pull request
Jun 28, 2017
From what I can see, the last test case is intended to catch incorrect programs such as this, which don't take into account different-cased duplicates: isPangram = (== 26) . length . nub . filter isAlpha However the above program passed the final test as the count of distinct upper and lower case characters is 27, rather than 26. This commit changes the test text to a non-pangram that has exactly 26 distinct upper and lower case characters, which causes the above, incorrect program to fail. As in exercism/problem-specifications#852
kotp
added a commit
to exercism/ruby
that referenced
this pull request
Aug 27, 2017
Closed
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From what I can see, the last test case is inteded to catch incorrect
programs such as this, which don't take into account different-cased
duplicates:
However the above program passed the final test as the count of distinct
upper and lower case characters is 27, rather than 26.
This commit changes the test text to a non-pangram that has exactly 26
distinct upper and lower case characters, which causes the above,
incorrect program to fail.
Similar incorrect programs that checked if the count of distinct letters was >=, rather than exactly = to 26, would have correctly failed the existing test.