-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
non-exhaustive tests #81
Comments
I am working on the triangle problem's tests, and at the same time referencing https://github.com/exercism/problem-specifications/blob/master/exercises/triangle/canonical-data.json to make the tests congruent to the canonical tests. In this test I am concern about how the example implementation limits itself to a single answer because the test days proposes the following test case:
which if we test for explicitly Is there a way to accept the test with a choicepoint without raising a warning? Or should the test be changed to I think we should aim to be conformant to the canonical tests, so this requires an interface change somewhere. Thoughts? |
Maybe |
I think it all depends on how we want to view the query. (edit) Had more time to think/read. Changed my mind. |
Co-authored-by: Erik Schierboom <[email protected]>
Co-authored-by: Erik Schierboom <[email protected]>
@neenjaw What do you suggest we do with |
I haven't really thought about this issue for a long time, but I lean towards the problem set being written in such a way to promote deterministic solutions. I think those are better supported from the unit test library (if I recall correctly). |
#289 |
As explained here #80 there is a way to write tests that is not exhaustive enough. As an example, if we have a simple program like:
A test like:
succeeds. When is obviously not correct. nevertheless if we do this:
throws an error. In this case, this predicate should be tested like so
add(1,2,X), x =:= 3
.This is a particular characteristic of Prolog, and that is why is particularly confusing.
This are all tests that have this flaw:
If you submit a PR to fix one of them, please refer to this issue. And if you find another exercise with this problem add a comment here.
The text was updated successfully, but these errors were encountered: