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

roman-numerals: add test with longest output #2414

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

mpg
Copy link
Contributor

@mpg mpg commented Apr 1, 2024

This matters for languages like C where people need to allocate memory manually for the output.

An example of a mistake this would catch is if someone fails to consider that each arabic digit (except the thousands) can result in up to 4 letters. Or if they correctly compute a maximum of 15 letters but then forget to add 1 for the terminating null byte (in C).

Before this PR, those mistakes would not get caught, as the longest output in existing tests was 9 letters long.

Impact on existing solutions: in a lot of languages this will not matter. In languages with manual memory management, I think solutions that would fail the new test were never correct in the first place.

Copy link
Contributor

github-actions bot commented Apr 1, 2024

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 Apr 1, 2024
@BNAndras BNAndras reopened this Apr 1, 2024
Copy link
Member

@iHiD iHiD left a comment

Choose a reason for hiding this comment

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

Looks good to me. No exiting tests should fail for anyone if their code is valid, so there's no downside. I'd suggest individual tracks merging with "no important files changed" when this gets propagated (maybe you want to leave a note if you bulk it, @ErikSchierboom?)

@BNAndras BNAndras merged commit 438990d into exercism:main Apr 1, 2024
15 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.

None yet

5 participants