Module Test.QuickCheckTest

Imports

Table of Content

Definitions

data Args

Constructors

Args {replay ∷ Maybe (StdGen, Int), maxSuccess ∷ Int, maxDiscardRatio ∷ Int, maxSize ∷ Int, chatty ∷ Bool}

Member Functions

chattyArgsBool

whether to print anything

maxDiscardRatioArgsInt

maximum number of discarded tests per successful test before giving up

maxSizeArgsInt

size to use for the biggest test cases

maxSuccessArgsInt

maximum number of successful tests before succeeding

replayArgsMaybe (StdGen, Int)

should we replay a previous test?

data Result

Result represents the test result

Constructors

Failure {numTests ∷ Int, numShrinks ∷ Int, usedSeed ∷ StdGen, usedSize ∷ Int, reason ∷ String, interrupted ∷ Bool, labels ∷ [(String, Int)], output ∷ String}
GaveUp {numTests ∷ Int, labels ∷ [(String, Int)], output ∷ String}
NoExpectedFailure {numTests ∷ Int, labels ∷ [(String, Int)], output ∷ String}
Success {numTests ∷ Int, labels ∷ [(String, Int)], output ∷ String}

a successful test run

Member Functions

interruptedResultBool

access field interrupted

labelsResult → [(String, Int)]

labels and frequencies found during all tests

numShrinksResultInt

access field numShrinks

numTestsResultInt

number of successful tests performed

outputResultString

printed output

reasonResultString

access field reason

usedSeedResultStdGen

access field usedSeed

usedSizeResultInt

access field usedSize

isSuccessResultBool

isSuccess checks if the test run result was a success

stdArgsArgs

stdArgs are the default test arguments used

quickCheckTestable prop ⇒ prop → IO ()

Tests a property and prints the results to IO.stdout.

quickCheckWithTestable prop ⇒ Args → prop → IO ()

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

quickCheckResultTestable prop ⇒ prop → IO Result

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

quickCheckWithResultTestable prop ⇒ Args → prop → IO Result

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

verboseCheckTestable prop ⇒ prop → IO ()
verboseCheckWithTestable prop ⇒ Args → prop → IO ()
verboseCheckResultTestable prop ⇒ prop → IO Result
verboseCheckWithResultTestable prop ⇒ Args → prop → IO Result
testState → (StdGenIntProp) → IO Result
doneTestingState → (StdGenIntProp) → IO Result
giveUpState → (StdGenIntProp) → IO Result
runATestState → (StdGenIntProp) → IO Result
summaryState → [(String, Int)]
successStateIO ()
foundFailureStateP.Result → [Rose P.Result] → IO Int
localMinStateP.Result → [Rose P.Result] → IO Int
localMin'StateP.Result[Rose P.Result]IO Int
localMinFoundStateP.ResultIO Int
callbackPostTestStateP.ResultIO ()
callbackPostFinalFailureStateP.ResultIO ()
safelyStateIO ()IO ()

Instances

instance Show Args

Member Functions

displayArgsString

inherited from Show.display

showArgsString

Function generated for derived instance.

showCharsArgs → [Char]

inherited from Show.showChars

showList[Args]StringString

inherited from Show.showList

showsPrecIntArgsStringString

inherited from Show.showsPrec

showsubArgsString

Function generated for derived instance.

instance Show Result

Member Functions

displayResultString

inherited from Show.display

showResultString

Function generated for derived instance.

showCharsResult → [Char]

inherited from Show.showChars

showList[Result]StringString

inherited from Show.showList

showsPrecIntResultStringString

inherited from Show.showsPrec

showsubResultString

Function generated for derived instance.

instance Show StdGen

Member Functions

displayStdGenString

inherited from Show.display

showStdGenString
showCharsStdGen → [Char]

inherited from Show.showChars

showList[StdGen]StringString

inherited from Show.showList

showsPrecIntStdGenStringString

inherited from Show.showsPrec

showsubStdGenString

inherited from Show.showsub

Functions and Values by Type

Maybe (StdGen, Int) → IntIntIntBoolArgs

Args.Args

[StdGen] → StringString

Show_StdGen.showList

[Args] → StringString

Show_Args.showList

[Result] → StringString

Show_Result.showList

Int → [(String, Int)] → StringResult

Result.NoExpectedFailure, Result.GaveUp, Result.Success

IntIntStdGenIntStringBool → [(String, Int)] → StringResult

Result.Failure

IntStdGenStringString

Show_StdGen.showsPrec

IntArgsStringString

Show_Args.showsPrec

IntResultStringString

Show_Result.showsPrec

StdGenString

Show_StdGen.showsub, Show_StdGen.display, Show_StdGen.show

StdGen → [Char]

Show_StdGen.showChars

State → (StdGenIntProp) → IO Result

doneTesting, giveUp, runATest, test

StateIO ()IO ()

safely

StateP.Result → [Rose P.Result] → IO Int

foundFailure, localMin, localMin'

StateP.ResultIO ()

callbackPostFinalFailure, callbackPostTest

StateP.ResultIO Int

localMinFound

StateIO ()

success

State → [(String, Int)]

summary

Args → (Maybe (StdGen, Int)→Maybe (StdGen, Int)) → Args

Args.chg$replay

Args → (BoolBool) → Args

Args.chg$chatty

Args → (IntInt) → Args

Args.chg$maxSuccess, Args.chg$maxDiscardRatio, Args.chg$maxSize

ArgsMaybe (StdGen, Int) → Args

Args.upd$replay

ArgsBoolArgs

Args.upd$chatty

ArgsIntArgs

Args.upd$maxSize, Args.upd$maxSuccess, Args.upd$maxDiscardRatio

ArgsMaybe (StdGen, Int)

Args.replay

ArgsString

Show_Args.showsub, Show_Args.display, Show_Args.show

Args → [Char]

Show_Args.showChars

ArgsBool

Args.chatty

ArgsInt

Args.maxSuccess, Args.maxDiscardRatio, Args.maxSize

Result → (StringString) → Result

Result.chg$reason, Result.chg$output

Result → ([(String, Int)]→[(String, Int)]) → Result

Result.chg$labels

Result → (BoolBool) → Result

Result.chg$interrupted

Result → (IntInt) → Result

Result.chg$usedSize, Result.chg$numShrinks, Result.chg$numTests

Result → (StdGenStdGen) → Result

Result.chg$usedSeed

ResultStringResult

Result.upd$output, Result.upd$reason

Result → [(String, Int)] → Result

Result.upd$labels

ResultBoolResult

Result.upd$interrupted

ResultIntResult

Result.upd$usedSize, Result.upd$numShrinks, Result.upd$numTests

ResultStdGenResult

Result.upd$usedSeed

ResultString

Show_Result.showsub, Show_Result.display, Show_Result.show, Result.output, Result.reason

Result → [(String, Int)]

Result.labels

Result → [Char]

Show_Result.showChars

ResultBool

isSuccess, Result.interrupted, Result.has$usedSize, Result.has$output, Result.has$reason, Result.has$usedSeed, Result.has$numShrinks, Result.has$interrupted, Result.has$labels, Result.has$numTests

ResultInt

Result.usedSize, Result.numShrinks, Result.numTests

ResultStdGen

Result.usedSeed

Args

stdArgs

𝖆 → Bool

Args.has$replay, Args.has$maxSize, Args.has$maxSuccess, Args.has$chatty, Args.has$maxDiscardRatio

Testable prop ⇒ Args → prop → IO ()

quickCheckWith, verboseCheckWith

Testable prop ⇒ Args → prop → IO Result

quickCheckWithResult, verboseCheckWithResult

Testable prop ⇒ prop → IO ()

quickCheck, verboseCheck

Testable prop ⇒ prop → IO Result

quickCheckResult, verboseCheckResult

Valid HTML 4.01 Strict