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

[custom-set] Add test for deduplication #2324

Merged
merged 4 commits into from
Sep 24, 2023
Merged

[custom-set] Add test for deduplication #2324

merged 4 commits into from
Sep 24, 2023

Conversation

senekor
Copy link
Contributor

@senekor senekor commented Sep 16, 2023

We should have a test case where a set is instantiated with a slice containing duplicate values.

motivated by:
exercism/rust#1275

@neenjaw
Copy link
Contributor

neenjaw commented Sep 16, 2023

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.

@senekor
Copy link
Contributor Author

senekor commented Sep 16, 2023

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",
Copy link
Member

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 🤷

Copy link
Contributor Author

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" 😂

Copy link
Member

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!

Copy link
Contributor Author

@senekor senekor Sep 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, changed it!

@senekor senekor merged commit 988eafc into main Sep 24, 2023
7 checks passed
@senekor senekor deleted the custom-set-duplicates branch September 24, 2023 11:50
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.

None yet

5 participants