QuickCheck-2.1.1.1: Automatic testing of Haskell programsContentsIndex
Test.QuickCheck.Test
Contents
Running tests
Synopsis
data Args = Args {
replay :: Maybe (StdGen, Int)
maxSuccess :: Int
maxDiscard :: Int
maxSize :: Int
}
data Result
= Success {
labels :: [(String, Int)]
}
| GaveUp {
numTests :: Int
labels :: [(String, Int)]
}
| Failure {
usedSeed :: StdGen
usedSize :: Int
reason :: String
labels :: [(String, Int)]
}
| NoExpectedFailure {
labels :: [(String, Int)]
}
isSuccess :: Result -> Bool
stdArgs :: Args
quickCheck :: Testable prop => prop -> IO ()
quickCheckWith :: Testable prop => Args -> prop -> IO ()
quickCheckResult :: Testable prop => prop -> IO Result
quickCheckWithResult :: Testable prop => Args -> prop -> IO Result
test :: State -> (StdGen -> Int -> Prop) -> IO Result
doneTesting :: State -> (StdGen -> Int -> Prop) -> IO Result
giveUp :: State -> (StdGen -> Int -> Prop) -> IO Result
runATest :: State -> (StdGen -> Int -> Prop) -> IO Result
summary :: State -> [(String, Int)]
success :: State -> IO ()
foundFailure :: State -> Result -> [Rose (IO Result)] -> IO ()
localMin :: State -> Result -> [Rose (IO Result)] -> IO ()
localMinFound :: State -> Result -> IO ()
callbackPostTest :: State -> Result -> IO ()
callbackPostFinalFailure :: State -> Result -> IO ()
Running tests
data Args
Args specifies arguments to the QuickCheck driver
Constructors
Args
replay :: Maybe (StdGen, Int)should we replay a previous test?
maxSuccess :: Intmaximum number of successful tests before succeeding
maxDiscard :: Intmaximum number of discarded tests before giving up
maxSize :: Intsize to use for the biggest test cases
show/hide Instances
data Result
Result represents the test result
Constructors
Success
labels :: [(String, Int)]labels and frequencies found during all tests
GaveUp
numTests :: Intnumber of successful tests performed
labels :: [(String, Int)]labels and frequencies found during all tests
Failure
usedSeed :: StdGenwhat seed was used
usedSize :: Intwhat was the test size
reason :: Stringwhat was the reason
labels :: [(String, Int)]labels and frequencies found during all tests
NoExpectedFailure
labels :: [(String, Int)]labels and frequencies found during all tests
show/hide Instances
isSuccess :: Result -> Bool
isSuccess checks if the test run result was a success
stdArgs :: Args
stdArgs are the default test arguments used
quickCheck :: Testable prop => prop -> IO ()
Tests a property and prints the results to stdout.
quickCheckWith :: Testable prop => Args -> prop -> IO ()
Tests a property, using test arguments, and prints the results to stdout.
quickCheckResult :: Testable prop => prop -> IO Result
Tests a property, produces a test result, and prints the results to stdout.
quickCheckWithResult :: Testable prop => Args -> prop -> IO Result
Tests a property, using test arguments, produces a test result, and prints the results to stdout.
test :: State -> (StdGen -> Int -> Prop) -> IO Result
doneTesting :: State -> (StdGen -> Int -> Prop) -> IO Result
giveUp :: State -> (StdGen -> Int -> Prop) -> IO Result
runATest :: State -> (StdGen -> Int -> Prop) -> IO Result
summary :: State -> [(String, Int)]
success :: State -> IO ()
foundFailure :: State -> Result -> [Rose (IO Result)] -> IO ()
localMin :: State -> Result -> [Rose (IO Result)] -> IO ()
localMinFound :: State -> Result -> IO ()
callbackPostTest :: State -> Result -> IO ()
callbackPostFinalFailure :: State -> Result -> IO ()
Produced by Haddock version 2.6.1