QuickCheck-1.2.0.1: Automatic testing of Haskell programs

Copyright(c) Andy Gill 2001
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityexperimental
Portabilitynon-portable (uses Control.Exception, Control.Concurrent)
Safe HaskellNone
LanguageHaskell98

Test.QuickCheck.Batch

Description

A batch driver for running QuickCheck.

Note: in GHC only, it is possible to place a time limit on each test, to ensure that testing terminates.

Synopsis

Documentation

run :: Testable a => a -> TestOptions -> IO TestResult Source

Run the test. Here we use the same random number each time, so we get reproducable results!

runTests :: String -> TestOptions -> [TestOptions -> IO TestResult] -> IO () Source

Prints a one line summary of various tests with common theme

data TestOptions Source

Constructors

TestOptions 

Fields

no_of_tests :: Int

number of tests to run.

length_of_tests :: Int

time limit for test, in seconds. If zero, no time limit. Note: only GHC supports time limits.

debug_tests :: Bool
 

isBottom :: a -> Bool Source

Look out behind you! These can be misused badly. However, in the context of a batch tester, can also be very useful.

Examples of use of bottom and isBottom:

	{- test for abort -}
	prop_head2 = isBottom (head [])
	{- test for strictness -}
	prop_head3 = isBottom (head bottom)