Skip to content

Conversation

@KaranChadha10
Copy link
Contributor

Description

This PR contains the following points:

  • Add test case for when target balance equals current balance
  • Add test case for when target balance is already exceeded
  • Both cases should return 0 years as target is already met
  • Prevents incorrect do-while implementations from passing tests

Fixes #1976

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2025

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

github-actions bot commented Oct 5, 2025

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 5, 2025
@KaranChadha10 KaranChadha10 changed the title test: Add edge case tests for YearsBeforeDesiredBalance test: Add edge case tests for YearsBeforeDesiredBalance in Interest_Is_Interesting Oct 5, 2025
@KaranChadha10
Copy link
Contributor Author

@ErikSchierboom This PR was auto-closed by GitHub Actions, but I believe the issue has been properly resolved. Could you please review the changes when you have a chance?
The PR addresses the issue #1976.
Thank you!

@ErikSchierboom ErikSchierboom reopened this Oct 6, 2025
@ErikSchierboom ErikSchierboom merged commit caa9452 into exercism:main Oct 6, 2025
9 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.

interest-is-interesting: years before reaching desired balance when targetBalance <= balance

2 participants