-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
[custom-set] Add test for deduplication #2324
Conversation
motivated by: exercism/rust#1275
Is a set with duplicate elements a valid set? I think part of what may be adding to confusion here is that an array notation is being used to hold the contents of a set. Also, I am not sure this is a test that tests for deduplication as exercism/rust#1741 seemed concerned about and this was identified as the solve covering it. |
sorry for opening this PR without a forum post, discussion should continue here |
}, | ||
{ | ||
"uuid": "0b95204d-93fa-4b60-9499-1e34f228c336", | ||
"description": "set is a subset of set with duplicates", |
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.
A set with with duplicates isn't technically a set 🤷
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.
Yes 😅 but it's shorter than "a set constructed from an array with duplicates" 😂
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.
It is, but I actually like the second version better!
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.
OK, changed it!
We should have a test case where a set is instantiated with a slice containing duplicate values.
motivated by:
exercism/rust#1275