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

updating tests for Reverse-String exercise #1037

Merged
merged 13 commits into from
Jan 26, 2025

Conversation

jagdish-15
Copy link
Contributor

Pull Request: Update Test Suite for Reverse-String Exercise

This pull request updates the test suite for the Reverse-String exercise, bringing it in line with the latest problem specification. With this update, all tests for the exercise are now fully synchronized.

@siebenschlaefer
Copy link
Contributor

Did you write an example solution in C that deals with unicode and grapheme clusters?
Do we really expect our students to do that?

@wolf99
Copy link
Contributor

wolf99 commented Jan 9, 2025

The current tests and example implementation do not handle wide characters, grapheme clusters, UTF, etc. It only handles 8-bit ASCII characters.

So unless this exercise is radically changed then these tests should be marked as not implemented and the failing tests removed.

It mat be a good addition to the track to have an exercise that handles such characters (I don't think we have any other such exercise). But I don't know if this should be that exercise, and I don't think such a change is within the scope of the simple update that was intended.

@jagdish-15
Copy link
Contributor Author

jagdish-15 commented Jan 17, 2025

Hi @wolf99,

I've temporarily commented out these tests for now. If there's a more standardized or preferred approach, please let me know, and I'll make the necessary adjustments.

I was considering using TEST_IGNORE() as an alternative—do you think that would be the right way to proceed?

Apologies for the delay in revisiting this; I was tied up with exams.

Copy link
Contributor

@wolf99 wolf99 left a comment

Choose a reason for hiding this comment

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

Hi @jagdish-15

Unfortunately TEST_IGNORE() is not suitable as we use this in valid tests that are expected to succeed as a student enables each one in turn (enabling them to use TDD loop to develop a solution).

Instead, because in this track we do not want to include these cases for this exercise, the tests need to be removed completely.
However, we need some way to mark that we have explicitly decided not to include these tests.
Luckily the .meta/tests.tomlfile format allows this 😄

You can see the format details here: https://exercism.org/docs/building/tracks/practice-exercises#h-file-meta-tests-toml
My review suggestions here implement this.

@jagdish-15 jagdish-15 force-pushed the update-tests-reverse-string branch from be5b56d to 72a7aa4 Compare January 26, 2025 10:22
@jagdish-15
Copy link
Contributor Author

@wolf99

In the last commit you suggested, there was an issue related to the end-of-line sequence, which caused the check to fail. I have now force-pushed the updated changes, resolving the issue, and all the tests are passing successfully!

Please take a look and let me know if there’s anything else you’d like me to adjust.

@wolf99 wolf99 merged commit 36faa27 into exercism:main Jan 26, 2025
4 checks passed
@wolf99
Copy link
Contributor

wolf99 commented Jan 26, 2025

Merged.
Well done @jagdish-15 !

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