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

crypto-square: tests do not actually verify whitespace #895

Closed
nicuveo opened this issue Mar 2, 2020 · 4 comments · Fixed by #997
Closed

crypto-square: tests do not actually verify whitespace #895

nicuveo opened this issue Mar 2, 2020 · 4 comments · Fixed by #997

Comments

@nicuveo
Copy link
Contributor

nicuveo commented Mar 2, 2020

The problem statement explains that text should be justified, and the canonical tests do seem to suggest that we should verify that (some "expected" strings have trailing whitespace).

However, we currently do not compare the strings: we do several tests to provide very detailed error messages... but we ignore all those whitespace issues in the process of doing so.

I would be fairly easy to fix: just one additional test that checks that the two strings are identical. But I chose to open an issue rather than just create a PR, to discuss how to best approach this.

@sshine
Copy link
Contributor

sshine commented Mar 25, 2020

While non-core exercises (the ones that are often associated with a low chance of immediate or any feedback, and which I've proposed that we're able to disable feedback for in exercism/exercism#5153) don't receive a lot of attention, you are quite right.

You are welcome to submit an additional test. It would probably be a worthy addition to the canonical tests also, even though they are still locked down. So let's put a pin in that for now.

@sshine
Copy link
Contributor

sshine commented Nov 15, 2020

At this point, the problem-specifications repository has been re-opened.

Before then it was always an option to just add a test in this repository only.

Would you be interested in doing either at this point, @nicuveo?

ashaindlin added a commit to ashaindlin/haskell that referenced this issue Aug 1, 2021
petertseng pushed a commit to ashaindlin/haskell that referenced this issue Aug 1, 2021
@petertseng
Copy link
Member

I see that the decision to ignore whitespace was a deliberate decision, with the reasoning in #259. However, my judgment will be that as long as our output is a String, it's better to keep it as the problem description says, for it would be against the description if a student emitted an output with a lot of leading spaces (among others). If we change the output to a [String], then we could freely choose whether to require the trailing spaces or forbid them.

petertseng pushed a commit to ashaindlin/haskell that referenced this issue Aug 1, 2021
Fixes exercism#895, the complaint that
the whitespace was being ignored.

The canonical test data itself is fine; the problem was that the test
suite was ignoring whitespace when comparing the actual result to the
expected result.

The decision to ignore whitespace was a originally deliberate decision,
with the reasoning in exercism#259.

However, maintainers' current judgment is that as long as our output is
a String, it's better to keep it as the problem description says, for it
would be against the description if a student emitted an output with a
lot of leading spaces (among others).

If the track changes the output to a [String], then the maintainers
could freely choose whether to require the trailing spaces or forbid
them.
petertseng pushed a commit to ashaindlin/haskell that referenced this issue Aug 1, 2021
Fixes exercism#895, the complaint that
the whitespace was being ignored.

The canonical test data itself is fine; the problem was that the test
suite was ignoring whitespace when comparing the actual result to the
expected result.

The decision to ignore whitespace was a originally deliberate decision,
with the reasoning in exercism#259.

However, maintainers' current judgment is that as long as our output is
a String, it's better to keep it as the problem description says, for it
would be against the description if a student emitted an output with a
lot of leading spaces (among others).

If the track changes the output to a [String], then the maintainers
could freely choose whether to require the trailing spaces or forbid
them.
@petertseng
Copy link
Member

I considered changing this in exercism/problem-specifications#1827, but my main observation is that since this is a ciphering exercise, the focus isn't on human understandability of the output.

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 a pull request may close this issue.

3 participants