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

tests: update say exercise #903

Merged
merged 3 commits into from
Oct 8, 2024
Merged

Conversation

Elahi-cs
Copy link
Contributor

@Elahi-cs Elahi-cs commented Sep 22, 2024

This PR is the result of running this command:
image

using the test creation helper tool linked in the wiki, with some modifications to the code necessary for the tool to work.

Copy link
Contributor

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.

Copy link
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!

@github-actions github-actions bot closed this Sep 22, 2024
@Elahi-cs Elahi-cs mentioned this pull request Sep 22, 2024
21 tasks
@vaeng vaeng reopened this Sep 22, 2024
@Elahi-cs
Copy link
Contributor Author

@vaeng everything should be fixed now. A couple of questions:

  • I had to modify the exercise creation tool that you linked on the wiki, because it expects configlet to be on the same folder, but configlet expects to be run on the root folder of the repo. Do you see it necessary/useful to add these changes to the tool branch?
  • Would it be useful to document the process to update these test cases? I'm talking setup tool -> run tool -> format with clang-format -> check for errors. I don't know if it's something that could be of help in the future or if it the process will be discarded once the 6 remaining exercises have their tests updated.

@vaeng
Copy link
Contributor

vaeng commented Oct 4, 2024

Hello @Elahi-cs,

Thanks for your patience. You did the right thing to ask in the forum and also a nudge to look at this would have been fine.

I think your change is good and welcome, I wanted to ask the other maintainers for feedback before going further, but I haven't had the time yet.

As a result of my late reply, this September or will become tagged for hacktoberfest.

I will not be able to check your code until Tuesday, but maybe @siebenschlaefer has some capacity this weekend.

ahans
ahans previously requested changes Oct 4, 2024
Copy link
Contributor

@ahans ahans left a comment

Choose a reason for hiding this comment

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

The changes look mostly fine, but the two cases giving an error in CI need to be fixed.

exercises/practice/say/say_test.cpp Outdated Show resolved Hide resolved
exercises/practice/say/say_test.cpp Outdated Show resolved Hide resolved
@Elahi-cs
Copy link
Contributor Author

Elahi-cs commented Oct 8, 2024

@ahans @vaeng Thank you both for your guidance and you feedback! Everything should be resolved now.

Related question: is there a way to run the CI tests locally? I don't like making the pipeline run the tests every time, but I also don't know if there's a good way other than using act.

@Elahi-cs Elahi-cs requested a review from ahans October 8, 2024 10:18
@ahans
Copy link
Contributor

ahans commented Oct 8, 2024

Related question: is there a way to run the CI tests locally? I don't like making the pipeline run the tests every time, but I also don't know if there's a good way other than using act.

To run exactly what happens in CI, you probably won't get around using something such as act. But what happens is not exactly black magic and you can check the files in .github to see what's going on. The actual code tests are all managed via CMake and run here. So if you have all the prerequisites installed, you can this locally:

cmake .
# run all tests
cmake --build .
# alternatively, run just a single test:
cmake --build . -- test_say

Copy link
Contributor

@vaeng vaeng left a comment

Choose a reason for hiding this comment

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

That looks good to me, I don't see any reason not to merge this now.
@ahans remarks seem to be addressed.

@vaeng vaeng dismissed ahans’s stale review October 8, 2024 11:08

Changes have been addressed.

@vaeng vaeng merged commit 8c494a4 into exercism:main Oct 8, 2024
8 checks passed
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.

3 participants