Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Run more QC test (10^5 for each test case)

Also use random seed instad of constant one
  • Loading branch information...
commit ba612b8479355bb3454f40d3ccc06d54e0a59c62 1 parent 0e37554
@Shimuuar Shimuuar authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 test/QC.hs
View
8 test/QC.hs
@@ -31,10 +31,12 @@ prop_InRange g (OrderedPair (x1,x2)) = monadicIO $ do
type InRange a = OrderedPair a -> Property
test_InRange :: IO ()
-test_InRange = do
- g <- create
+test_InRange = withSystemRandom $ \g -> do
+ -- Run really lot of tests in order to catch corner cases
let q :: (Testable prop) => prop -> IO ()
- q = quickCheck
+ q = quickCheckWith stdArgs { maxSuccess = 10^5
+ , chatty = False -- Don't print anything. Too slow
+ }
putStrLn "Int8" >> q (prop_InRange g :: InRange Int8)
putStrLn "Int16" >> q (prop_InRange g :: InRange Int16)
putStrLn "Int32" >> q (prop_InRange g :: InRange Int32)
Please sign in to comment.
Something went wrong with that request. Please try again.