Skip to content

Commit 5831c4f

Browse files
Merge pull request UnkindPartition#88 from 3of8/master
Fixed bug with expectFailure in tasty-quickcheck
2 parents f6771b3 + bcf23b7 commit 5831c4f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

quickcheck/Test/Tasty/QuickCheck.hs

+7-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ instance IsTest QC where
116116

117117
return $
118118
(if successful r then testPassed else testFailed)
119-
(if unexpected r && showReplay
119+
(if isFailure r && showReplay
120120
then QC.output r ++ reproduceMsg r
121121
else QC.output r
122122
)
@@ -134,6 +134,12 @@ unexpected r =
134134
QC.NoExpectedFailure {} -> True
135135
_ -> False
136136

137+
isFailure :: QC.Result -> Bool
138+
isFailure r =
139+
case r of
140+
QC.Failure {} -> True
141+
_ -> False
142+
137143
reproduceMsg :: QC.Result -> String
138144
reproduceMsg r =
139145
printf "Use --quickcheck-replay '%d %s' to reproduce."

0 commit comments

Comments
 (0)