Skip to content

grade-school: fix student cannot be in multiple grades logic #1819

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

Merged
merged 3 commits into from
Jul 14, 2021
Merged
Changes from all commits
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
26 changes: 26 additions & 0 deletions exercises/grade-school/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@
},
"expected": []
},
{
"uuid": "a0c7b9b8-0e89-47f8-8b4a-c50f885e79d1",
"reimplements": "c125dab7-2a53-492f-a99a-56ad511940d8",
"comments": [
"Reimplemented to be logically consistent"
],
"description": "A student can only be added to the same grade in the roster once",
"property": "roster",
"input": {
"students": [["Aimee", 2], ["Aimee", 2]]
},
"expected": ["Aimee"]
},
{
"uuid": "233be705-dd58-4968-889d-fb3c7954c9cc",
"description": "Adding more students adds them to the sorted roster",
Expand All @@ -45,6 +58,19 @@
},
"expected": ["Chelsea", "Logan"]
},
{
"uuid": "6a03b61e-1211-4783-a3cc-fc7f773fba3f",
"reimplements": "c125dab7-2a53-492f-a99a-56ad511940d8",
"comments": [
"Reimplemented to be logically consistent"
],
"description": "A student cannot be added to more than one grade in the sorted roster",
"property": "roster",
"input": {
"students": [["Aimee", 2], ["Aimee", 1]]
},
"expected": ["Aimee"]
},
{
"uuid": "a3f0fb58-f240-4723-8ddc-e644666b85cc",
"description": "Roster returns an empty list if there are no students enrolled",
Expand Down