Skip to content

chore: redo and update grade-school tests - #1040

Open
vaeng wants to merge 1 commit into
mainfrom
sync-09-2026
Open

vaeng wants to merge 1 commit into
mainfrom
sync-09-2026

Conversation

@vaeng

@vaeng vaeng commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

@Elahi-cs already did some of the work, but we never finished. So this is a clean slate that supersedes #920.

@github-actions

Copy link
Copy Markdown
Contributor

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@ahans ahans left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just some nits

@@ -9,83 +11,177 @@

using namespace std;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pulling an entire namespace in is considered bad practice. I believe we do this in many places today, but what do you think about changing it and updating this test while you're at it?

TEST_CASE("a_new_school_has_an_empty_roster") {
TEST_CASE("roster_is_empty_when_no_student_is_added",
"[a3f0fb58-f240-4723-8ddc-e644666b85cc]") {
const grade_school::school school_{};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The trailing underscore here and in other places look odd. Using them only for class/struct members makes sense, but for local variables I would remove them. Wdyt?

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.

2 participants