Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
two-bucket: test inability to reach the goal (#1580)
1. A test where the goal is too large. The student solution would need to either: * (If searching the state space) Notice that there are no further states to be visited, and yet the solution has not been reached. * Notice that the goal is larger than the larger bucket, therefore can be rejected immediately. 2. A test where the goal is not too large yet still can't be reached The student solution would need to either: * (If searching the state space) Notice that there are no further states to be visited, and yet the solution has not been reached. * Notice that the goal is not divisible by the GCD of the bucket sizes, therefore can be rejected immediately. In case the student assumes that all non-coprime bucket counts will invalidate the goal, a counterexample to that is given as well (buckets not coprime but goal is still possible). There are ten implementing tracks: bash csharp fsharp go java javascript python ruby rust typescript Of these tracks, only two of them (Bash, Go) currently test the condition where it is not possible to reach the goal. Having this test serves as a reminder that it remains wise to handle the situation where a search has not found its goal. It doesn't seem like this was discussed in the original submission: exercism/DEPRECATED.javascript#68 So it seems like it would be good to have a discussion of it on record.