diff options
author | Erin van der Veen | 2017-11-20 13:56:34 +0100 |
---|---|---|
committer | Erin van der Veen | 2017-11-20 13:56:34 +0100 |
commit | 36d391a2467f6d95b65b7aa666231393199f9ef8 (patch) | |
tree | 654b33996f0062aeb6668989b141b351167631eb | |
parent | Merge branch '1-quickcheck-property-niet-meer-stukken-op-het-bord-na-een-zet'... (diff) |
Add sequential check property
-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 6741e70..1978f1e 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -101,5 +101,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})) |