-
-
Notifications
You must be signed in to change notification settings - Fork 228
Update reverse-string
missing test cases
#917
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
base: main
Are you sure you want to change the base?
Update reverse-string
missing test cases
#917
Conversation
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. |
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 |
I'm pretty sure there is a discussion about this exercise with @siebenschlaefer somewhere. Maybe it was on the forums? |
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 |
@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? |
Do you understand how the We could have a similar flag, like 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? |
I do! I just have a question: Would
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. |
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
With the edited Moving the advanced tests outside the |
Are you still working on this, or do you want me to finish your work @Elahi-cs |
Do you think the append will suffice? |
## Grapheme Clusters | ||
|
||
Unicode supports a lot of characters and languages. | ||
The displayed 'graphemes' are constructed from code points. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither graphemes nor code points are introduced before this sentence. An external link here might be useful as background info.
|
||
## Grapheme Clusters | ||
|
||
Unicode supports a lot of characters and languages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unicode is not introduced before this sentence. I'd similarly recommend an external link and perhaps a framing sentence about how Unicode is relevant before diving into the technical details.
Now consider more [complex constructions][grapheme-construction] like the Bengali word `ঝিল্লি`, which consists of six code points. | ||
|
||
As graphemes make the string reversal process a lot more complicated, we made the respective test cases optional. | ||
You can try them out by setting the `TEST_GRAPHEMES` compiler flag or editing the test file accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try them out by setting the `TEST_GRAPHEMES` compiler flag or editing the test file accordingly. | |
You can try them out by setting the `TEST_GRAPHEMES` preprocessor define or editing the test file accordingly. |
As graphemes make the string reversal process a lot more complicated, we made the respective test cases optional. | ||
You can try them out by setting the `TEST_GRAPHEMES` compiler flag or editing the test file accordingly. | ||
|
||
[grapheme-construction]: https://r12a.github.io/uniview/?charlist=%E0%A6%9D%E0%A6%BF%E0%A6%B2%E0%A7%8D%E0%A6%B2%E0%A6%BF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me this sounds reasonable, but @BNAndras's points are valid. Having a few more external references probably wouldn't hurt.
However, what I'm missing most here is something about how to approach this in C++. Simply using something like std::u16string
won't work, since in the test cases we clearly use UTF-8. Are students expected to implement some UTF-8 handling themselves? Can they use some library?
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.