-
-
Notifications
You must be signed in to change notification settings - Fork 557
Add test for over-counting horizontal neighbors in Flower Field #2603
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
Add test for over-counting horizontal neighbors in Flower Field #2603
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. |
Co-authored-by: Isaac Good <[email protected]>
Update to add new test case from exercism/problem-specifications#2603.
Update to add new test case from exercism/problem-specifications#2603. Also, changed all Collections.singletonList and Arrays.asList calls to the modern List.of calls for consistency.
Update to add new test case from exercism/problem-specifications#2603.
* Update flower field Update to add new test case from exercism/problem-specifications#2603. Also, changed all Collections.singletonList and Arrays.asList calls to the modern List.of calls for consistency. * Update flower field tests.toml This is to reflect the update to the exercise's test in the previous commit.
Update to add new test case from exercism/problem-specifications#2603.
This adds a single test case to catch implementations that overcount contiguous horizontal flowers (e.g., scanning chains instead of immediate neighbors). As discussed and approved in the forum thread: https://forum.exercism.org/t/flower-field-overcounting-horizontal-neighbors-issue/19774
The test uses the suggestion from @IsaacG: Input
[" ** "], Expected["1**1"].No vertical test added, as the buggy example doesn't fail there, and we agreed to keep tests non-exhaustive.
Thanks to @IsaacG, @SleeplessByte, and @mk-mxp for the feedback and consensus!