summaryrefslogtreecommitdiff
path: root/test/test_parser.hs
diff options
context:
space:
mode:
authorCamil Staps2017-11-13 15:25:39 +0100
committerCamil Staps2017-11-13 15:25:39 +0100
commitbc124e3e0b776ee20fe2fd4c507e1f81a8f69ad0 (patch)
tree3b8eec71eb2262112aa67bc10798e114ba4ff2d9 /test/test_parser.hs
parentUpdate introduction assignment 3 (diff)
Add shrink for PGN
Diffstat (limited to 'test/test_parser.hs')
-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