Remove debugging putStr from the QC-HUnit adaptor.
This was what was causing random numbers to appear during testing. I've also cleaned up the code a bit.
This commit is contained in:
parent
9e9459cb4a
commit
e460032c30
|
@ -92,21 +92,17 @@ testCheck config property =
|
|||
tests :: Config -> Gen Result -> StdGen -> Int -> Int -> [[String]] -> IO ()
|
||||
tests config gen rnd0 ntest nfail stamps
|
||||
| ntest == configMaxTest config = return ()
|
||||
| nfail == configMaxFail config =
|
||||
assertFailure $ "Arguments exhausted after " ++ show ntest ++ " tests"
|
||||
| otherwise =
|
||||
do putStr (configEvery config ntest (arguments result))
|
||||
case ok result of
|
||||
Nothing ->
|
||||
tests config gen rnd1 ntest (nfail+1) stamps
|
||||
Just True ->
|
||||
tests config gen rnd1 (ntest+1) nfail (stamp result:stamps)
|
||||
Just False ->
|
||||
assertFailure $ ( "Falsifiable, after "
|
||||
++ show ntest
|
||||
++ " tests:\n"
|
||||
++ unlines (arguments result)
|
||||
)
|
||||
| nfail == configMaxFail config
|
||||
= assertFailure $ "Arguments exhausted after " ++ show ntest ++ " tests"
|
||||
| otherwise
|
||||
= case ok result of
|
||||
Nothing ->
|
||||
tests config gen rnd1 ntest (nfail+1) stamps
|
||||
Just True ->
|
||||
tests config gen rnd1 (ntest+1) nfail (stamp result:stamps)
|
||||
Just False ->
|
||||
assertFailure $ "Falsifiable, after " ++ show ntest
|
||||
++ " tests:\n" ++ unlines (arguments result)
|
||||
where
|
||||
result = generate (configSize config ntest) rnd2 gen
|
||||
(rnd1,rnd2) = split rnd0
|
||||
|
|
Loading…
Reference in New Issue
Block a user