Portability | non-portable (uses Control.Concurrent, GHC.Conc ) |
---|---|
Stability | experimental |
Maintainer | shelarcy <shelarcy@gmail.com> |
Safe Haskell | Trustworthy |
A parallel batch driver for running QuickCheck on threaded or SMP systems. See the Example.hs file for a complete overview.
- module Test.QuickCheck
- pRun :: Int -> Int -> [Test] -> IO ()
- pRun' :: Int -> [Test] -> IO ()
- pRunAllProcessors :: Int -> [Test] -> IO ()
- pRunWithNum :: Int -> Int -> [Test] -> IO ()
- type Name = String
- type Depth = Int
- type Test = (Name, Depth -> IO Result)
- pDet :: Testable a => a -> Depth -> IO Result
- pNon :: Testable a => a -> Depth -> IO Result
Documentation
module Test.QuickCheck
pRun' :: Int -> [Test] -> IO ()Source
Variant of pRunWithNum
. Run a list of QuickCheck properties in parallel
chunks, using number of Haskell threads that can run truly simultaneously
(on separate physical processors) at any given time. For example,
import Test.QuickCheck.Parallel pRun' 1000 [ ("sort1", pDet prop_sort1) , ("sort2", pDet prop_sort2) ]
with SMP runtime's '-N[n]' flag will run n
threads over the property list,
to depth 1000. (see getNumCapabilities
for more details.)
pRunAllProcessors :: Int -> [Test] -> IO ()Source
Variant of pRunWithNum
. Run a list of QuickCheck properties in parallel
chunks, using all Processors.
pRunWithNum :: Int -> Int -> [Test] -> IO ()Source
Run a list of QuickCheck properties in parallel chunks, using
n
Haskell threads (first argument), and test to a depth of d
(second argument). Compile your application with '-threaded' and run
with the SMP runtime's '-N4' (or however many OS threads you want to
donate), for best results.
import Test.QuickCheck.Parallel do n <- getArgs >>= readIO . head pRunWithNum n 1000 [ ("sort1", pDet prop_sort1) ]
Will run n
threads over the property list, to depth 1000.
If you want to specify n
by using '-N[n]', use pRun'
instead of
this function.