tasty-quickcheck-0.8.4: QuickCheck support for the Tasty test framework.

Safe Haskell | None
Language | Haskell2010

Test.Tasty.QuickCheck

Contents

- Internal

Description

This module allows to use QuickCheck properties in tasty.

Synopsis

- testProperty :: Testable a => TestName -> a -> TestTree
- newtype QuickCheckTests = QuickCheckTests Int
- newtype QuickCheckReplay = QuickCheckReplay (Maybe (QCGen, Int))
- newtype QuickCheckShowReplay = QuickCheckShowReplay Bool
- newtype QuickCheckMaxSize = QuickCheckMaxSize Int
- newtype QuickCheckMaxRatio = QuickCheckMaxRatio Int
- newtype QuickCheckVerbose = QuickCheckVerbose Bool
- module Test.QuickCheck
- newtype QC = QC Property

# Documentation

testProperty :: Testable a => TestName -> a -> TestTree Source #

Create a `Test` for a QuickCheck `Testable` property

newtype QuickCheckTests Source #

Number of test cases for QuickCheck to generate

Constructors

QuickCheckTests Int |

Instances

Enum QuickCheckTests Source # |

Methods

succ :: QuickCheckTests -> QuickCheckTests #

pred :: QuickCheckTests -> QuickCheckTests #

toEnum :: Int -> QuickCheckTests #

fromEnum :: QuickCheckTests -> Int #

enumFrom :: QuickCheckTests -> [QuickCheckTests] #

enumFromThen :: QuickCheckTests -> QuickCheckTests -> [QuickCheckTests] #

enumFromTo :: QuickCheckTests -> QuickCheckTests -> [QuickCheckTests] #

enumFromThenTo :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests -> [QuickCheckTests] #

Eq QuickCheckTests Source # |
Methods (==) :: QuickCheckTests -> QuickCheckTests -> Bool # (/=) :: QuickCheckTests -> QuickCheckTests -> Bool #
Integral QuickCheckTests Source # |

Methods

quot :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

rem :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

div :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

mod :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

quotRem :: QuickCheckTests -> QuickCheckTests -> (QuickCheckTests, QuickCheckTests) #

divMod :: QuickCheckTests -> QuickCheckTests -> (QuickCheckTests, QuickCheckTests) #

toInteger :: QuickCheckTests -> Integer #

Num QuickCheckTests Source # |
Methods (+) :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests # (-) :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests # (*) :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests # negate :: QuickCheckTests -> QuickCheckTests # abs :: QuickCheckTests -> QuickCheckTests # signum :: QuickCheckTests -> QuickCheckTests # fromInteger :: Integer -> QuickCheckTests #
Ord QuickCheckTests Source # |

Methods

compare :: QuickCheckTests -> QuickCheckTests -> Ordering #

(<) :: QuickCheckTests -> QuickCheckTests -> Bool #

(<=) :: QuickCheckTests -> QuickCheckTests -> Bool #

(>) :: QuickCheckTests -> QuickCheckTests -> Bool #

(>=) :: QuickCheckTests -> QuickCheckTests -> Bool #

max :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

min :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests #

Real QuickCheckTests Source # |
Methods toRational :: QuickCheckTests -> Rational #
IsOption QuickCheckTests Source # |
Methods defaultValue :: QuickCheckTests # parseValue :: String -> Maybe QuickCheckTests # optionName :: Tagged * QuickCheckTests String # optionHelp :: Tagged * QuickCheckTests String # optionCLParser :: Parser QuickCheckTests #

newtype QuickCheckReplay Source #

Replay a previous test using a replay token

Constructors

QuickCheckReplay (Maybe (QCGen, Int)) |

Instances

IsOption QuickCheckReplay Source # |
Methods defaultValue :: QuickCheckReplay # parseValue :: String -> Maybe QuickCheckReplay # optionName :: Tagged * QuickCheckReplay String # optionHelp :: Tagged * QuickCheckReplay String # optionCLParser :: Parser QuickCheckReplay #

newtype QuickCheckShowReplay Source #

If a test case fails unexpectedly, show the replay token

Constructors

QuickCheckShowReplay Bool |

Instances

IsOption QuickCheckShowReplay Source # |
Methods defaultValue :: QuickCheckShowReplay # parseValue :: String -> Maybe QuickCheckShowReplay # optionName :: Tagged * QuickCheckShowReplay String # optionHelp :: Tagged * QuickCheckShowReplay String # optionCLParser :: Parser QuickCheckShowReplay #

newtype QuickCheckMaxSize Source #

Size of the biggest test cases

Constructors

QuickCheckMaxSize Int |

Instances

Enum QuickCheckMaxSize Source # |

Methods

succ :: QuickCheckMaxSize -> QuickCheckMaxSize #

pred :: QuickCheckMaxSize -> QuickCheckMaxSize #

toEnum :: Int -> QuickCheckMaxSize #

fromEnum :: QuickCheckMaxSize -> Int #

enumFrom :: QuickCheckMaxSize -> [QuickCheckMaxSize] #

enumFromThen :: QuickCheckMaxSize -> QuickCheckMaxSize -> [QuickCheckMaxSize] #

enumFromTo :: QuickCheckMaxSize -> QuickCheckMaxSize -> [QuickCheckMaxSize] #

enumFromThenTo :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize -> [QuickCheckMaxSize] #

Eq QuickCheckMaxSize Source # |
Methods (==) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool # (/=) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #
Integral QuickCheckMaxSize Source # |

Methods

quot :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

rem :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

div :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

mod :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

quotRem :: QuickCheckMaxSize -> QuickCheckMaxSize -> (QuickCheckMaxSize, QuickCheckMaxSize) #

divMod :: QuickCheckMaxSize -> QuickCheckMaxSize -> (QuickCheckMaxSize, QuickCheckMaxSize) #

toInteger :: QuickCheckMaxSize -> Integer #

Num QuickCheckMaxSize Source # |

Methods

(+) :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

(-) :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

(*) :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

negate :: QuickCheckMaxSize -> QuickCheckMaxSize #

abs :: QuickCheckMaxSize -> QuickCheckMaxSize #

signum :: QuickCheckMaxSize -> QuickCheckMaxSize #

fromInteger :: Integer -> QuickCheckMaxSize #

Ord QuickCheckMaxSize Source # |

Methods

compare :: QuickCheckMaxSize -> QuickCheckMaxSize -> Ordering #

(<) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #

(<=) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #

(>) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #

(>=) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #

max :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

min :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize #

Real QuickCheckMaxSize Source # |
Methods toRational :: QuickCheckMaxSize -> Rational #
IsOption QuickCheckMaxSize Source # |
Methods defaultValue :: QuickCheckMaxSize # parseValue :: String -> Maybe QuickCheckMaxSize # optionName :: Tagged * QuickCheckMaxSize String # optionHelp :: Tagged * QuickCheckMaxSize String # optionCLParser :: Parser QuickCheckMaxSize #

newtype QuickCheckMaxRatio Source #

Maximum number of of discarded tests per successful test before giving up.

Constructors

QuickCheckMaxRatio Int |

Instances

Enum QuickCheckMaxRatio Source # |

Methods

succ :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

pred :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

toEnum :: Int -> QuickCheckMaxRatio #

fromEnum :: QuickCheckMaxRatio -> Int #

enumFrom :: QuickCheckMaxRatio -> [QuickCheckMaxRatio] #

enumFromThen :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> [QuickCheckMaxRatio] #

enumFromTo :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> [QuickCheckMaxRatio] #

enumFromThenTo :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio -> [QuickCheckMaxRatio] #

Eq QuickCheckMaxRatio Source # |
Methods (==) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool # (/=) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #
Integral QuickCheckMaxRatio Source # |

Methods

quot :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

rem :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

div :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

mod :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

quotRem :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> (QuickCheckMaxRatio, QuickCheckMaxRatio) #

divMod :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> (QuickCheckMaxRatio, QuickCheckMaxRatio) #

toInteger :: QuickCheckMaxRatio -> Integer #

Num QuickCheckMaxRatio Source # |

Methods

(+) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

(-) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

(*) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

negate :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

abs :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

signum :: QuickCheckMaxRatio -> QuickCheckMaxRatio #

fromInteger :: Integer -> QuickCheckMaxRatio #

Ord QuickCheckMaxRatio Source # |

Methods

compare :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Ordering #

(<) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #

(<=) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #

(>) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #

(>=) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #

max :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

min :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio #

Real QuickCheckMaxRatio Source # |
Methods toRational :: QuickCheckMaxRatio -> Rational #
IsOption QuickCheckMaxRatio Source # |
Methods defaultValue :: QuickCheckMaxRatio # parseValue :: String -> Maybe QuickCheckMaxRatio # optionName :: Tagged * QuickCheckMaxRatio String # optionHelp :: Tagged * QuickCheckMaxRatio String # optionCLParser :: Parser QuickCheckMaxRatio #

newtype QuickCheckVerbose Source #

Show the test cases that QuickCheck generates

Constructors

QuickCheckVerbose Bool |

Instances

IsOption QuickCheckVerbose Source # |
Methods defaultValue :: QuickCheckVerbose # parseValue :: String -> Maybe QuickCheckVerbose # optionName :: Tagged * QuickCheckVerbose String # optionHelp :: Tagged * QuickCheckVerbose String # optionCLParser :: Parser QuickCheckVerbose #

module Test.QuickCheck

# Internal

This is exposed for testing purposes and not considered as a part of the public API. You probably shouldn't need it.

newtype QC Source #

Constructors

QC Property |

Instances

IsTest QC Source # |
Methods run :: OptionSet -> QC -> (Progress -> IO ()) -> IO Result # testOptions :: Tagged * QC [OptionDescription] #