diff options
author | Camil Staps | 2017-11-20 13:58:07 +0100 |
---|---|---|
committer | Camil Staps | 2017-11-20 13:58:07 +0100 |
commit | a2b0697c3f1e9e21430eb7a95267aee076b39982 (patch) | |
tree | 0ff351545213e06a1e30131f5a6bfbbf30f4e2fe | |
parent | Merge branch 'refactor-atAnyState' into 'master' (diff) | |
parent | Add sequential check property (diff) |
Merge branch '7-quickcheck-property-if-a-side-was-in-check-before-a-ply-he-should-not-be-in-check-anymore-after-that-ply' into 'master'
Add sequential check property
Closes #7
See merge request eveen/Testing-Techniques!6
-rw-r--r-- | test/Test.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Test.hs b/test/Test.hs index 168983b..b9f58b3 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -96,5 +96,10 @@ prop_number_of_pieces = atAnyTwoStates (\b1 b2 -> length (pieceCoords Nothing Nothing b1) - 1 == length (pieceCoords Nothing Nothing b2) ) +prop_not_in_check_twice :: PGN -> Bool +prop_not_in_check_twice = atAnyTwoStates (\b1 b2 -> + not (check Black b1 && check Black b2) && + not (check White b1 && check White b2)) + return [] main = $forAllProperties (quickCheckWithResult (stdArgs {maxSuccess=10000})) |