summaryrefslogtreecommitdiff
path: root/Test/QuickCheck/Test.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Test/QuickCheck/Test.hs')
-rw-r--r--Test/QuickCheck/Test.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Test/QuickCheck/Test.hs b/Test/QuickCheck/Test.hs
index 2972f0e..77ab445 100644
--- a/Test/QuickCheck/Test.hs
+++ b/Test/QuickCheck/Test.hs
@@ -359,11 +359,13 @@ failureSummaryAndReason st res = (summary, full)
concat [
" and " ++
show (numSuccessShrinks st) ++
- concat [ "." ++ show (numTryShrinks st) | full, numTryShrinks st > 0 ] ++
+ concat [ "." ++ show (numTryShrinks st) | showNumTryShrinks ] ++
" shrink" ++
- (if numSuccessShrinks st == 1 && numTryShrinks st == 0 then "" else "s")
- | numSuccessShrinks st > 0 || numTryShrinks st > 0 ] ++
+ (if numSuccessShrinks st == 1 && not showNumTryShrinks then "" else "s")
+ | numSuccessShrinks st > 0 || showNumTryShrinks ] ++
")"
+ where
+ showNumTryShrinks = full && numTryShrinks st > 0
summary :: State -> [(String, Double)]
summary st = reverse