You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by Oren Ben-Kiki | August 15th, 2012 @ 09:58 AM
I added something like this:
quickCheckWithNewArgs :: QC.Testable prop => (Args -> Args)-> prop-> IO ()
quickCheckWithNewArgs modifyArgs test = do
result <- quickCheckWithResult (modifyArgs $ stdArgs { chatty = False }) test
case result of
Success {} ->
return ()
Failure {} ->
assertFailure $ "QuickCheck failed\n" ++ extra result
GaveUp {} ->
assertFailure $ "QuickCheck gave up after: " ++ (show $ numTests result) ++ " tests\n" ++ extra result
NoExpectedFailure {} ->
assertFailure $ "QuickCheck failed to trigger expected failure\n" ++ extra result
where
extra result =
output result ++ (concatMap showLabelFrequency $ labels result)
showLabelFrequency (label, frequency) =
"\nSeen label: " ++ label ++ " with frequency: " ++ show frequency
quickCheckRepeatTests :: QC.Testable prop => Int-> prop -> IO ()
quickCheckRepeatTests number test = do
quickCheckWithNewArgs setTestsNumber test
where
setTestsNumber number args =
args { maxSuccess = number }
It seems like something along these lines should be a part of test-framework-quickcheck2.
The text was updated successfully, but these errors were encountered:
Reported by Oren Ben-Kiki | August 15th, 2012 @ 09:58 AM
I added something like this:
It seems like something along these lines should be a part of
test-framework-quickcheck2
.The text was updated successfully, but these errors were encountered: