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

Knapsack: Fix empty list of items #2350

Merged
merged 1 commit into from Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions exercises/knapsack/canonical-data.json
Expand Up @@ -12,6 +12,17 @@
},
"expected": 0
},
{
"uuid": "3993a824-c20e-493d-b3c9-ee8a7753ee59",
"reimplements": "a4d7d2f0-ad8a-460c-86f3-88ba709d41a7",
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a re-implements when the expected generated test code shouldn't change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, the CI tests fail if I change the existing test case 🤷

Copy link
Member

Choose a reason for hiding this comment

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

It's technically a breaking change, so yeah the reimplements makes sense here I think.

"description": "no items",
"property": "maximumValue",
"input": {
"maximumWeight": 100,
"items": []
},
"expected": 0
},
{
"uuid": "1d39e98c-6249-4a8b-912f-87cb12e506b0",
"description": "one item, too heavy",
Expand Down