diff options
author | Erin van der Veen | 2017-11-20 13:58:05 +0100 |
---|---|---|
committer | Erin van der Veen | 2017-11-20 13:58:05 +0100 |
commit | 20f37b1354d7ffdafa2a552060fff330d0671845 (patch) | |
tree | 78fc0929cc2575c412d1f858c5ac253cc3b3628b /test/Test.hs | |
parent | Merge branch '1-quickcheck-property-niet-meer-stukken-op-het-bord-na-een-zet'... (diff) | |
parent | Refactor atAnyState (diff) |
Merge branch 'refactor-atAnyState' into 'master'
Refactor atAnyState
See merge request eveen/Testing-Techniques!5
Diffstat (limited to 'test/Test.hs')
-rw-r--r-- | test/Test.hs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/Test.hs b/test/Test.hs index 6741e70..168983b 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -21,12 +21,7 @@ import Chess.PGN import ArbitraryMove atAnyState :: (Board -> Bool) -> PGN -> Bool -atAnyState ok pgn = and [ok b | Right b <- seqList [moveSAN m | m <- moves pgn] $ Right defaultBoard] - where - seqList :: [r -> Either e r] -> Either e r -> [Either e r] - seqList (f:fs) (Right io) = f io:seqList fs (f io) - seqList _ (Left _) = [] - seqList [] _ = [] +atAnyState = atAnyTwoStates . const atAnyTwoStates :: (Board -> Board -> Bool) -> PGN -> Bool atAnyTwoStates ok pgn = |