Test.Tasty.QuickCheck

tasty-quickcheck-0.9.1: 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 Int)
- newtype QuickCheckShowReplay = QuickCheckShowReplay Bool
- newtype QuickCheckMaxSize = QuickCheckMaxSize Int
- newtype QuickCheckMaxRatio = QuickCheckMaxRatio Int
- newtype QuickCheckVerbose = QuickCheckVerbose Bool
- module Test.QuickCheck
- newtype QC = QC Property
- optionSetToArgs :: OptionSet -> IO (Int, Args)

# Documentation

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

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

newtype QuickCheckTests #

Number of test cases for QuickCheck to generate

Constructors

QuickCheckTests Int |

Instances

Enum QuickCheckTests # |
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 # |
Methods (==) :: QuickCheckTests -> QuickCheckTests -> Bool # (/=) :: QuickCheckTests -> QuickCheckTests -> Bool #
Integral QuickCheckTests # |
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 # |
Methods (+) :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests # (-) :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests # (*) :: QuickCheckTests -> QuickCheckTests -> QuickCheckTests # negate :: QuickCheckTests -> QuickCheckTests # abs :: QuickCheckTests -> QuickCheckTests # signum :: QuickCheckTests -> QuickCheckTests # fromInteger :: Integer -> QuickCheckTests #
Ord QuickCheckTests # |
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 # |
Methods toRational :: QuickCheckTests -> Rational #
IsOption QuickCheckTests # |
Methods defaultValue :: QuickCheckTests # parseValue :: String -> Maybe QuickCheckTests # optionName :: Tagged * QuickCheckTests String # optionHelp :: Tagged * QuickCheckTests String # optionCLParser :: Parser QuickCheckTests #

newtype QuickCheckReplay #

Constructors

QuickCheckReplay (Maybe Int) |

Instances

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

newtype QuickCheckShowReplay #

If a test case fails unexpectedly, show the replay token

Constructors

QuickCheckShowReplay Bool |

Instances

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

newtype QuickCheckMaxSize #

Size of the biggest test cases

Constructors

QuickCheckMaxSize Int |

Instances

Enum QuickCheckMaxSize # |
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 # |
Methods (==) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool # (/=) :: QuickCheckMaxSize -> QuickCheckMaxSize -> Bool #
Integral QuickCheckMaxSize # |
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 # |
Methods (+) :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize # (-) :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize # (*) :: QuickCheckMaxSize -> QuickCheckMaxSize -> QuickCheckMaxSize # negate :: QuickCheckMaxSize -> QuickCheckMaxSize # abs :: QuickCheckMaxSize -> QuickCheckMaxSize # signum :: QuickCheckMaxSize -> QuickCheckMaxSize # fromInteger :: Integer -> QuickCheckMaxSize #
Ord QuickCheckMaxSize # |
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 # |
Methods toRational :: QuickCheckMaxSize -> Rational #
IsOption QuickCheckMaxSize # |
Methods defaultValue :: QuickCheckMaxSize # parseValue :: String -> Maybe QuickCheckMaxSize # optionName :: Tagged * QuickCheckMaxSize String # optionHelp :: Tagged * QuickCheckMaxSize String # optionCLParser :: Parser QuickCheckMaxSize #

newtype QuickCheckMaxRatio #

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

Constructors

QuickCheckMaxRatio Int |

Instances

Enum QuickCheckMaxRatio # |
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 # |
Methods (==) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool # (/=) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> Bool #
Integral QuickCheckMaxRatio # |
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 # |
Methods (+) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio # (-) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio # (*) :: QuickCheckMaxRatio -> QuickCheckMaxRatio -> QuickCheckMaxRatio # negate :: QuickCheckMaxRatio -> QuickCheckMaxRatio # abs :: QuickCheckMaxRatio -> QuickCheckMaxRatio # signum :: QuickCheckMaxRatio -> QuickCheckMaxRatio # fromInteger :: Integer -> QuickCheckMaxRatio #
Ord QuickCheckMaxRatio # |
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 # |
Methods toRational :: QuickCheckMaxRatio -> Rational #
IsOption QuickCheckMaxRatio # |
Methods defaultValue :: QuickCheckMaxRatio # parseValue :: String -> Maybe QuickCheckMaxRatio # optionName :: Tagged * QuickCheckMaxRatio String # optionHelp :: Tagged * QuickCheckMaxRatio String # optionCLParser :: Parser QuickCheckMaxRatio #

newtype QuickCheckVerbose #

Show the test cases that QuickCheck generates

Constructors

QuickCheckVerbose Bool |

Instances

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

module Test.QuickCheck

# Internal

If you are building a test suite, you don't need these functions.

They may be used by other tasty add-on packages (such as tasty-hspec).

newtype QC #

Constructors

QC Property |

Instances

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

optionSetToArgs :: OptionSet -> IO (Int, Args) #

Convert tasty options into QuickCheck options.

This is a low-level function that was originally added for tasty-hspec but may be used by others.

Since: 0.9.1