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

fix: tests for saddle points #453

Merged
merged 2 commits into from
Nov 22, 2024
Merged

fix: tests for saddle points #453

merged 2 commits into from
Nov 22, 2024

Conversation

kkweon
Copy link
Contributor

@kkweon kkweon commented Nov 21, 2024

[EDITED] to change the test cases instead of the instruction

The original instruction is confusing because it implies a row-first coordinate (row, col), 

> So the point at `[2, 1]` (row: 2, column: 1) is a great spot for a tree house.

but the expectation is a column-first coordinate, such as (col, row) or (X, Y) assuming X is on the horizontal axis. 

For example, the first test case is almost the same example as in the instruction, and it returns (1, 2) = (Col, Row).

The current instruction text `[2, 1]` is not consistent with the test result `(1, 2)`.

https://github.com/exercism/prolog/blob/64074e43cb2deae529ad60dd62afce73d23f8a00/exercises/practice/saddle-points/saddle_points_tests.plt#L10-L13

Copy link

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 Nov 21, 2024
@ErikSchierboom
Copy link
Member

The text comes a shared source (https://github.com/exercism/problem-specifications/blob/main/exercises/saddle-points/instructions.md) so we can't really change that. We should then change the exercise, even though it will invalidate all existing solutions.

@kkweon
Copy link
Contributor Author

kkweon commented Nov 22, 2024

Would you prefer that or leave as is? Invalidating existing solutions don't sound too good to me.

@ErikSchierboom
Copy link
Member

Only 11 people have started the exercise, so I think that is fine. Would you be willing to make the change?

@kkweon
Copy link
Contributor Author

kkweon commented Nov 22, 2024

yeah let me update in this PR

The instruction is implying the row-first coordinate. When it's actually tested,
the expectation is  column-first coordinate, (col, row).

(1,2) is the expected result rather than (2, 1).
@kkweon kkweon changed the title fix: update the instruction for saddle points fix: tests for saddle points Nov 22, 2024
@kkweon
Copy link
Contributor Author

kkweon commented Nov 22, 2024

PTAL @ErikSchierboom , thanks!

@ErikSchierboom
Copy link
Member

You'll also need to update the example solution

- Saddle points: Corrected example coordinates.
- Word count: Fixed example syntax.
- Atbash cipher: Fixed example syntax.
@kkweon
Copy link
Contributor Author

kkweon commented Nov 22, 2024

Thank you! I also noticed that some other tests were failing, but the script did not catch them because PLUnit returned a success code when there was a syntax error.

@ErikSchierboom
Copy link
Member

I also noticed that some other tests were failing, but the script did not catch them because PLUnit returned a success code when there was a syntax error.

Great catch! That's bad though! Any idea how we can fix that?

@ErikSchierboom ErikSchierboom merged commit ca8a7fd into exercism:main Nov 22, 2024
@kkweon
Copy link
Contributor Author

kkweon commented Nov 22, 2024

Thanks. Will take a look and send a fix.

@kkweon
Copy link
Contributor Author

kkweon commented Nov 22, 2024

#454 has been created but closed.

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.

2 participants