PR: tests fix: queen-attack: make X and Y different in diagonal attack/2 tests

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?

This is my PR:

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.

That exercise is defined and pulled from the problem specs. That sounds like a good PR to push, but it would need to be to the specs repo.

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.