Added new test for grade school exercise


After finishing the exercise grade-school, I noticed that a test is missing when looking at the instructions.

From the instructions:

Note that all our students only have one name (It’s a small town, what do you want?) and each student cannot be added more than once to a grade or the roster. In fact, when a test attempts to add the same student more than once, your implementation should indicate that this is incorrect.

But there isn’t a test to check if the user add the same name multiple times.

Sorry if I made a PR before discussing it. Here the link to the PR

Added new test for grade school exercise by ThGnommy · Pull Request #885 · exercism/cpp (

You may want to read Suggesting Exercise Improvements | Exercism's Docs

This exercise should be synced from the problem spec. Changes to the problem spec tests should be discussed prior to opening a PR.

There are plenty of tests in problem-specifications for “same name” situations. It’s just that the tests for this exercise haven’t been refreshed in 5 years.

Instead of inventing a new test, can you configlet sync this C++ exercise? You don’t have to implement all the missing ones.

Thank you guys for your replies.

So, to refresh this exercise, I need to add the tests based on the problem specs.
I tried to launch the configlet sync and it says 16 test cases are missing but I do not need to add all of them.

Am I correct?

Ideally all of those would be added to completely sync them. It helps a bit to sync some but if it’s not fully synced that leaves a test gap and someone else would need to go through the whole process again to sync the rest.

1 Like

I imagine that adding some of those test cases would force you to re-implement the example solution. For example, adding a student returns a boolean value.

You can pick and choose which test cases to add.

1 Like