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

Update reverse-string missing test cases #917

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Elahi-cs
Copy link
Contributor

As mentioned by @BNAndras in #775 , some of reverse-string's test cases were created after opening the issue. This PR adds the missing test cases.

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.

@github-actions github-actions bot closed this Oct 11, 2024
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!

@Elahi-cs Elahi-cs mentioned this pull request Oct 11, 2024
21 tasks
@vaeng vaeng reopened this Oct 11, 2024
@vaeng
Copy link
Contributor

vaeng commented Oct 11, 2024

I'm pretty sure there is a discussion about this exercise with @siebenschlaefer somewhere.
I think the final consent was to not include the grapheme-based tests, as they are painful to implement in c++14 (and probably still are for c++23).

Maybe it was on the forums?

@BNAndras
Copy link
Member

Julia hides the grapheme tests behind a flag the student needs to set so that might be an option here. That'd require the example solution to be reworked.

@vaeng
Copy link
Contributor

vaeng commented Oct 16, 2024

Julia hides the grapheme tests behind a flag the student needs to set so that might be an option here. That'd require the example solution to be reworked.

Great idea. I like that. We could hide it with compiler flag option and describe the how-to in .docs/introduction.append.md. Marked as an additional challenge, it would not even interfere with the test runner.

@Elahi-cs
Copy link
Contributor Author

Elahi-cs commented Nov 4, 2024

@vaeng should I try to make these changes to the test cases to hide them behind a compiler flag in this same pull request? Could you elaborate as to how that wouldn't interfere with the test runner?

@vaeng
Copy link
Contributor

vaeng commented Nov 4, 2024

Do you understand how the EXERCISM_RUN_ALL_TESTS flag is used?

We could have a similar flag, like ADVANCED_STRING_TESTS and describe the usage and reasoning in an .append.md for expert students.

You do have to use this PR for both, as the CI checks will not run otherwise and they make a logical group for a PR.

(Also you need some code formatting to pass the other check).

Do you need help for these?

@Elahi-cs
Copy link
Contributor Author

Elahi-cs commented Nov 6, 2024

Do you understand how the EXERCISM_RUN_ALL_TESTS flag is used?

We could have a similar flag, like ADVANCED_STRING_TESTS and describe the usage and reasoning in an .append.md for expert students.

I do! I just have a question: Would EXERCISM_RUN_ALL_TESTS include all tests in this case? Or would both EXERCISM_RUN_ALL_TESTS and ADVANCED_STRING_TESTS need to be used to run both the tests and the grapheme cluster tests?

You do have to use this PR for both, as the CI checks will not run otherwise and they make a logical group for a PR.

(Also you need some code formatting to pass the other check).

Do you need help for these?

That makes sense! I'll get on that then. I'll let you know if I have any further questions, thank you for your guidance.

@vaeng
Copy link
Contributor

vaeng commented Nov 7, 2024

Would EXERCISM_RUN_ALL_TESTS include all tests in this case? Or would both EXERCISM_RUN_ALL_TESTS and ADVANCED_STRING_TESTS need to be used to run both the tests and the grapheme cluster tests?

If you want to be clean, you can edit the example files in the .meta directory, to be able to solve the added cases. In that case you would also need to edit the CMakeLists.txt to set the new ADVANCED_STRING_TESTS flag - here:

target_compile_definitions(${exercise} PRIVATE EXERCISM_RUN_ALL_TESTS)

With the edited CMakeLists.txt the test-runner will see your added code. If you don't set the flag, it won't notice the difference.

Moving the advanced tests outside the EXERCISM_RUN_ALL_TESTS group does not really make a difference. To have it a bit cleaner, I would have them below in an extra grouping, anyway.

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