summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2017-11-13 15:25:39 +0100
committerCamil Staps2017-11-13 15:25:39 +0100
commitbc124e3e0b776ee20fe2fd4c507e1f81a8f69ad0 (patch)
tree3b8eec71eb2262112aa67bc10798e114ba4ff2d9
parentUpdate introduction assignment 3 (diff)
Add shrink for PGN
-rw-r--r--test/test_parser.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_parser.hs b/test/test_parser.hs
index de9883e..397248f 100644
--- a/test/test_parser.hs
+++ b/test/test_parser.hs
@@ -61,6 +61,8 @@ instance Arbitrary PGN
sensibleString = listOf $ choose ('a', 'z')
+ shrink pgn = [pgn {moves=ms} | ms <- shrink $ moves pgn]
+
main = quickCheck (withMaxSuccess 10000 checkPGN)
where
checkPGN :: PGN -> Bool