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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions exercises/custom-set/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,26 @@
"set2": [4, 1, 3]
},
"expected": false
},
{
"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!

"property": "subset",
"input": {
"set1": [1, 2, 3],
"set2": [1, 1, 2, 3]
},
"expected": true
},
{
"uuid": "0bb37820-cabf-483f-901c-b278e42e4af9",
"description": "set with duplicates is a subset of set without duplicates",
"property": "subset",
"input": {
"set1": [1, 1, 2, 3],
"set2": [1, 2, 3]
},
"expected": true
}
]
},
Expand Down