-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Update grade-school
tests
#920
base: main
Are you sure you want to change the base?
Conversation
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.
For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping |
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
Thanks for the update. Something broke, so the tests are not passing |
@vaeng I might need a little bit of guidance on this one. After running configlet, several new tests were added that were not there before. I've done my best to implement them, but some of them are not passing the pipeline tests. An example of this is TEST_CASE("Cannot add student to same grade in the roster more than once",
"[87c871c1-6bde-4413-9c44-73d59a259d83]") {
grade_school::school school_;
school_.add("Blair", 2);
school_.add("James", 2);
school_.add("James", 2);
school_.add("Paul", 2);
REQUIRE(school_.grade(2) == vector<string>{"Blair", "James", "Paul"});
} However it doesn't seem to be required by the solutions:
Should I disregard these tests and mark them as not included in the Thanks in advance. |
The new tests found an "error" in the example solution:
I would rather fix this in the example solution, so the test can pass, than to exclude the test. |
Thanks for the clarification @vaeng , I will work on fixing the example solution. Follow-up question: Is there a way to run the tests against the example solution locally? When I run |
When I work locally, I imitate the exercise set-up and write my example code in the cpp and header files. When I am happy with the result I copy everything to the example files and reset the source and headers to their initial state. I'm sure there is a more elegant solution, but this one is pretty okay. |
This PR aims to update all tests in the
grade-school
exercise. The tests were created manually because the fact that some object-oriented adjustments were necessary made it impossible for theexercise_creation_helper
to actually help. I'm hesitant the changes were done correctly because of my lack of experience with the platform, but I've tried to stick to the original test cases where possible and to use the same style with the missing test cases.@vaeng let me know what you think.