Closed depial closed 1 month ago
I've change the testing to the alternate true/false
, and modified the instructions a bit to make the return values clearer.
and modified the instructions a bit to make the return values clearer.
Could you revert this change? The instructions are synced from https://github.com/exercism/problem-specifications, so if they need to be improved they should be improved there. What you are allowed to do, is to create an instructions.append.md
file, which contents will be appended to the instructions.md
when the user views the exercise.
I've reverted the changes to instructions.md
and added a short instructions.append.md
file.
There are two suggestions for testing in the problem specifications. The more rigorous choice, of testing a returned chain for validity, was used here in
runtests.jl
and requires a helper function to evaluate the users function. Main points:Below is another implementation of the algorithm which simply returns true/false if a chain is possible. The accompanying test set is below that. The change to the algorithm below is very minor, but this change may still be easier for some students. Due to this change being for less experienced students I have explicitly tested as
@test dominoes(input) == true/false
for clarity, instead of using the return value directly (i.e.@test dominoes(input)/!dominoes(input))
. This points at another potential benefit which is that no helper function is needed for testing the validity of the chain.Alternate
example.jl
:Alternate testset for above algo: