I have made an error in diagonal condition when doing queen-attack exercise. I wrote “abs(FromX-ToY)” instead of “abs(FromX-ToX)”.
This was not catched by the tests, because the choises there are accidentally equial in this regard. Changing From tuple from (2,2) to (2,3) fixes this. I have adjusted To tuples accordingly.
For some reason my PR was auto-closed. I am not adding any “new ideas”, this is just a fix for the test suit so it can catch the error I did. Let me know what the current process of contribution fixes is. I guess by posting to this forum?
I can confirm that getting faulty code past the current tests is common. I have a student right now who submitted a solution that passed but was wrong in a different way. The tests suggested by the linked PR catch my student’s mistake too.
I have checked the problem specs and this issue is already fixed there. The “can attack on fourth diagonal” test there has “(1,7), (0,6)” opposite to “(2,2), (5,5)” currently in Prolog tests.
So either it does not get pulled from there or maybe it is not automatic. The values in question were updated in the problem specs on Apr 15, 2019. Also, looks like more tests were in fact added since then.