From c34bfd161d295949d9bafdb551c4b4e860f20a5a Mon Sep 17 00:00:00 2001 From: Erin van der Veen Date: Wed, 22 Nov 2017 16:26:59 +0100 Subject: Implement Check after own move prop --- test/Test.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/Test.hs b/test/Test.hs index f8a8729..897c788 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -107,5 +107,12 @@ prop_not_in_check_twice = atAnyTwoStates (\b1 b2 -> not (check Black b1 && check Black b2) && not (check White b1 && check White b2)) +prop_move_not_result_check :: PGN -> Bool +prop_move_not_result_check = atAnyTwoStates (\b1 b2 -> + case turn b1 of + White -> not (check White b2) + Black -> not (check Black b2) + ) + return [] main = $forAllProperties (quickCheckWithResult (stdArgs {maxSuccess=10000})) -- cgit v1.2.3