summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2017-11-22 16:42:03 +0100
committerCamil Staps2017-11-22 16:42:03 +0100
commit3175c8d97ed9d43e34ed39f4d15313e402eee256 (patch)
tree0c24ad574722855d0d5b2e02001c824a719b1e4d
parentAdd prop_dont_touch_my_pieces (diff)
parentMerge branch '8-quickcheck-property-pinned-pieces-cannot-move' into 'master' (diff)
Merge branch 'master' of gitlab.science.ru.nl:eveen/Testing-Techniques into 2-quickcheck-property-zwart-wit-mag-geen-wit-zwart-stuk-verplaatsen
-rw-r--r--test/Test.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Test.hs b/test/Test.hs
index f451c75..032e125 100644
--- a/test/Test.hs
+++ b/test/Test.hs
@@ -107,6 +107,13 @@ 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)
+ )
+
prop_dont_touch_my_pieces :: PGN -> Bool
prop_dont_touch_my_pieces = atAnyTwoStates (\b1 b2 -> notMoved (turn b2) b1 b2)
where