QuickCheck-2.1.0.3: Automatic testing of Haskell programs

Test.QuickCheck.Test

Contents

Synopsis

Running tests

data Args Source

Args specifies arguments to the QuickCheck driver

Constructors

Args 

Fields

replay :: Maybe (StdGen, Int)

should we replay a previous test?

maxSuccess :: Int

maximum number of successful tests before succeeding

maxDiscard :: Int

maximum number of discarded tests before giving up

maxSize :: Int

size to use for the biggest test cases

Instances

data Result Source

Result represents the test result

Constructors

Success 

Fields

labels :: [(String, Int)]

labels and frequencies found during all tests

GaveUp 

Fields

numTests :: Int

number of successful tests performed

labels :: [(String, Int)]

labels and frequencies found during all tests

Failure 

Fields

usedSeed :: StdGen

what seed was used

usedSize :: Int

what was the test size

reason :: String

what was the reason

labels :: [(String, Int)]

labels and frequencies found during all tests

NoExpectedFailure 

Fields

labels :: [(String, Int)]

labels and frequencies found during all tests

Instances

isSuccess :: Result -> BoolSource

isSuccess checks if the test run result was a success

stdArgs :: ArgsSource

stdArgs are the default test arguments used

quickCheck :: Testable prop => prop -> IO ()Source

Tests a property and prints the results to stdout.

quickCheckWith :: Testable prop => Args -> prop -> IO ()Source

Tests a property, using test arguments, and prints the results to stdout.

quickCheckResult :: Testable prop => prop -> IO ResultSource

Tests a property, produces a test result, and prints the results to stdout.

quickCheckWithResult :: Testable prop => Args -> prop -> IO ResultSource

Tests a property, using test arguments, produces a test result, and prints the results to stdout.