exercism / ocaml

Exercism exercises in OCaml.
https://exercism.org/tracks/ocaml
MIT License
94 stars 50 forks source link

Hamming tests are not consistent #467

Closed Pamplemousse closed 1 year ago

Pamplemousse commented 1 year ago

There is a test that checks that two empty strands should return Ok 0: https://github.com/exercism/ocaml/blob/main/exercises/practice/hamming/test.ml#L24-L25

But also two checks that says "disallow * empty strand", expecting an error when given one of the two strands empty: https://github.com/exercism/ocaml/blob/main/exercises/practice/hamming/test.ml#L38-L41

github-actions[bot] commented 1 year ago

Hello. Thanks for opening an issue on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this issue has been pre-approved, please link back to this issue on the forum thread and a maintainer or staff member will reopen it.

georgyo commented 1 year ago

@Pamplemousse You likely want to re-raise this on the forms, but this is not a specific to the ocaml tests. The problem-specifications repo dictates these tests.

https://github.com/exercism/problem-specifications/blob/main/exercises/hamming/canonical-data.json

https://github.com/exercism/problem-specifications/blob/0b1dfc291099273d56ef77ca71bf7ca8a502b352/exercises/hamming/canonical-data.json#L14-L21

https://github.com/exercism/problem-specifications/blob/0b1dfc291099273d56ef77ca71bf7ca8a502b352/exercises/hamming/canonical-data.json#L116-L125

my guess is that if both inputs are empty than the correct answer is 0. But if only a single input is empty than it is a mistake to error on.