Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Test.Tasty.QuickCheck
Description
This module allows to use QuickCheck properties in tasty.
Synopsis
- testProperty :: Testable a => TestName -> a -> TestTree
- testProperties :: TestName -> [(String, Property)] -> 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
- newtype QuickCheckMaxShrinks = QuickCheckMaxShrinks Int
- data Fun a b = Fun (a :-> b, b, Shrunk) (a -> b)
- data Gen a
- class CoArbitrary a where
- coarbitrary :: a -> Gen b -> Gen b
- class Arbitrary2 (f :: Type -> Type -> Type) where
- liftArbitrary2 :: Gen a -> Gen b -> Gen (f a b)
- liftShrink2 :: (a -> [a]) -> (b -> [b]) -> f a b -> [f a b]
- class Arbitrary1 (f :: Type -> Type) where
- liftArbitrary :: Gen a -> Gen (f a)
- liftShrink :: (a -> [a]) -> f a -> [f a]
- class Arbitrary a where
- newtype PrintableString = PrintableString {}
- newtype UnicodeString = UnicodeString {}
- newtype ASCIIString = ASCIIString {}
- class ShrinkState s a where
- shrinkInit :: a -> s
- shrinkState :: a -> s -> [(a, s)]
- data Shrinking s a = Shrinking s a
- data Smart a = Smart Int a
- newtype Shrink2 a = Shrink2 {
- getShrink2 :: a
- newtype Small a = Small {
- getSmall :: a
- newtype Large a = Large {
- getLarge :: a
- newtype NonPositive a = NonPositive {
- getNonPositive :: a
- newtype NonNegative a = NonNegative {
- getNonNegative :: a
- newtype NonZero a = NonZero {
- getNonZero :: a
- newtype Negative a = Negative {
- getNegative :: a
- newtype Positive a = Positive {
- getPositive :: a
- newtype SortedList a = Sorted {
- getSorted :: [a]
- data InfiniteList a = InfiniteList {
- getInfiniteList :: [a]
- infiniteListInternalData :: InfiniteListInternalData a
- newtype NonEmptyList a = NonEmpty {
- getNonEmpty :: [a]
- newtype OrderedList a = Ordered {
- getOrdered :: [a]
- newtype Fixed a = Fixed {
- getFixed :: a
- newtype Blind a = Blind {
- getBlind :: a
- class Function a where
- function :: (a -> b) -> a :-> b
- data Confidence = Confidence {}
- data Discard = Discard
- class Testable prop where
- data Property
- pattern Fn3 :: (a -> b -> c -> d) -> Fun (a, b, c) d
- pattern Fn2 :: (a -> b -> c) -> Fun (a, b) c
- pattern Fn :: (a -> b) -> Fun a b
- failingClasses :: Result -> Set String
- failingLabels :: Result -> [String]
- failingTestCase :: Result -> [String]
- theException :: Result -> Maybe AnException
- reason :: Result -> String
- usedSize :: Result -> Int
- usedSeed :: Result -> QCGen
- numShrinkFinal :: Result -> Int
- numShrinkTries :: Result -> Int
- numShrinks :: Result -> Int
- output :: Result -> String
- tables :: Result -> Map String (Map String Int)
- classes :: Result -> Map String Int
- labels :: Result -> Map [String] Int
- numDiscarded :: Result -> Int
- numTests :: Result -> Int
- pattern NoExpectedFailure :: Int -> Int -> !(Map [String] Int) -> !(Map String Int) -> !(Map String (Map String Int)) -> String -> Result
- pattern Failure :: Int -> Int -> Int -> Int -> Int -> QCGen -> Int -> String -> Maybe AnException -> String -> [String] -> [String] -> Set String -> Result
- pattern Success :: Int -> Int -> !(Map [String] Int) -> !(Map String Int) -> !(Map String (Map String Int)) -> String -> Result
- pattern GaveUp :: Int -> Int -> !(Map [String] Int) -> !(Map String Int) -> !(Map String (Map String Int)) -> String -> Result
- (==>) :: Testable prop => Bool -> prop -> Property
- discard :: a
- variant :: Integral n => n -> Gen a -> Gen a
- sized :: (Int -> Gen a) -> Gen a
- getSize :: Gen Int
- resize :: Int -> Gen a -> Gen a
- scale :: (Int -> Int) -> Gen a -> Gen a
- choose :: Random a => (a, a) -> Gen a
- chooseAny :: Random a => Gen a
- chooseEnum :: Enum a => (a, a) -> Gen a
- chooseInt :: (Int, Int) -> Gen Int
- chooseBoundedIntegral :: (Bounded a, Integral a) => (a, a) -> Gen a
- chooseInteger :: (Integer, Integer) -> Gen Integer
- generate :: Gen a -> IO a
- sample' :: Gen a -> IO [a]
- sample :: Show a => Gen a -> IO ()
- suchThat :: Gen a -> (a -> Bool) -> Gen a
- suchThatMap :: Gen a -> (a -> Maybe b) -> Gen b
- suchThatMaybe :: Gen a -> (a -> Bool) -> Gen (Maybe a)
- oneof :: [Gen a] -> Gen a
- frequency :: [(Int, Gen a)] -> Gen a
- elements :: [a] -> Gen a
- sublistOf :: [a] -> Gen [a]
- shuffle :: [a] -> Gen [a]
- growingElements :: [a] -> Gen a
- listOf :: Gen a -> Gen [a]
- listOf1 :: Gen a -> Gen [a]
- vectorOf :: Int -> Gen a -> Gen [a]
- infiniteListOf :: Gen a -> Gen [a]
- arbitrary1 :: (Arbitrary1 f, Arbitrary a) => Gen (f a)
- shrink1 :: (Arbitrary1 f, Arbitrary a) => f a -> [f a]
- arbitrary2 :: (Arbitrary2 f, Arbitrary a, Arbitrary b) => Gen (f a b)
- shrink2 :: (Arbitrary2 f, Arbitrary a, Arbitrary b) => f a b -> [f a b]
- genericShrink :: (Generic a, RecursivelyShrink (Rep a), GSubterms (Rep a) a) => a -> [a]
- recursivelyShrink :: (Generic a, RecursivelyShrink (Rep a)) => a -> [a]
- subterms :: (Generic a, GSubterms (Rep a) a) => a -> [a]
- shrinkList :: (a -> [a]) -> [a] -> [[a]]
- applyArbitrary2 :: (Arbitrary a, Arbitrary b) => (a -> b -> r) -> Gen r
- applyArbitrary3 :: (Arbitrary a, Arbitrary b, Arbitrary c) => (a -> b -> c -> r) -> Gen r
- applyArbitrary4 :: (Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d) => (a -> b -> c -> d -> r) -> Gen r
- arbitrarySizedIntegral :: Integral a => Gen a
- arbitrarySizedNatural :: Integral a => Gen a
- arbitrarySizedFractional :: Fractional a => Gen a
- arbitraryBoundedIntegral :: (Bounded a, Integral a) => Gen a
- arbitraryBoundedRandom :: (Bounded a, Random a) => Gen a
- arbitraryBoundedEnum :: (Bounded a, Enum a) => Gen a
- arbitrarySizedBoundedIntegral :: (Bounded a, Integral a) => Gen a
- arbitraryUnicodeChar :: Gen Char
- arbitraryASCIIChar :: Gen Char
- arbitraryPrintableChar :: Gen Char
- shrinkNothing :: a -> [a]
- shrinkMap :: Arbitrary a => (a -> b) -> (b -> a) -> b -> [b]
- shrinkMapBy :: (a -> b) -> (b -> a) -> (a -> [a]) -> b -> [b]
- shrinkIntegral :: Integral a => a -> [a]
- shrinkBoundedEnum :: (Bounded a, Enum a, Eq a) => a -> [a]
- shrinkRealFrac :: RealFrac a => a -> [a]
- shrinkDecimal :: RealFrac a => a -> [a]
- genericCoarbitrary :: (Generic a, GCoArbitrary (Rep a)) => a -> Gen b -> Gen b
- (><) :: (Gen a -> Gen a) -> (Gen a -> Gen a) -> Gen a -> Gen a
- coarbitraryIntegral :: Integral a => a -> Gen b -> Gen b
- coarbitraryReal :: Real a => a -> Gen b -> Gen b
- coarbitraryShow :: Show a => a -> Gen b -> Gen b
- coarbitraryEnum :: Enum a => a -> Gen b -> Gen b
- vector :: Arbitrary a => Int -> Gen [a]
- orderedList :: (Ord a, Arbitrary a) => Gen [a]
- infiniteList :: Arbitrary a => Gen [a]
- functionBoundedEnum :: (Eq a, Bounded a, Enum a) => (a -> b) -> a :-> b
- functionRealFrac :: RealFrac a => (a -> b) -> a :-> b
- functionIntegral :: Integral a => (a -> b) -> a :-> b
- functionShow :: (Show a, Read a) => (a -> c) -> a :-> c
- functionVoid :: (forall b. void -> b) -> void :-> c
- functionMap :: Function b => (a -> b) -> (b -> a) -> (a -> c) -> a :-> c
- applyFun :: Fun a b -> a -> b
- applyFun2 :: Fun (a, b) c -> a -> b -> c
- applyFun3 :: Fun (a, b, c) d -> a -> b -> c -> d
- ioProperty :: Testable prop => IO prop -> Property
- idempotentIOProperty :: Testable prop => IO prop -> Property
- mapSize :: Testable prop => (Int -> Int) -> prop -> Property
- shrinking :: Testable prop => (a -> [a]) -> a -> (a -> prop) -> Property
- noShrinking :: Testable prop => prop -> Property
- counterexample :: Testable prop => String -> prop -> Property
- printTestCase :: Testable prop => String -> prop -> Property
- whenFail :: Testable prop => IO () -> prop -> Property
- whenFail' :: Testable prop => IO () -> prop -> Property
- verboseShrinking :: Testable prop => prop -> Property
- expectFailure :: Testable prop => prop -> Property
- once :: Testable prop => prop -> Property
- again :: Testable prop => prop -> Property
- withMaxSuccess :: Testable prop => Int -> prop -> Property
- checkCoverage :: Testable prop => prop -> Property
- checkCoverageWith :: Testable prop => Confidence -> prop -> Property
- stdConfidence :: Confidence
- label :: Testable prop => String -> prop -> Property
- collect :: (Show a, Testable prop) => a -> prop -> Property
- classify :: Testable prop => Bool -> String -> prop -> Property
- cover :: Testable prop => Double -> Bool -> String -> prop -> Property
- tabulate :: Testable prop => String -> [String] -> prop -> Property
- coverTable :: Testable prop => String -> [(String, Double)] -> prop -> Property
- within :: Testable prop => Int -> prop -> Property
- discardAfter :: Testable prop => Int -> prop -> Property
- forAll :: (Show a, Testable prop) => Gen a -> (a -> prop) -> Property
- forAllShow :: Testable prop => Gen a -> (a -> String) -> (a -> prop) -> Property
- forAllBlind :: Testable prop => Gen a -> (a -> prop) -> Property
- forAllShrink :: (Show a, Testable prop) => Gen a -> (a -> [a]) -> (a -> prop) -> Property
- forAllShrinkShow :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> Property
- forAllShrinkBlind :: Testable prop => Gen a -> (a -> [a]) -> (a -> prop) -> Property
- (.&.) :: (Testable prop1, Testable prop2) => prop1 -> prop2 -> Property
- (.&&.) :: (Testable prop1, Testable prop2) => prop1 -> prop2 -> Property
- conjoin :: Testable prop => [prop] -> Property
- (.||.) :: (Testable prop1, Testable prop2) => prop1 -> prop2 -> Property
- disjoin :: Testable prop => [prop] -> Property
- (===) :: (Eq a, Show a) => a -> a -> Property
- (=/=) :: (Eq a, Show a) => a -> a -> Property
- total :: NFData a => a -> Property
- isSuccess :: Result -> Bool
- polyQuickCheck :: Name -> ExpQ
- polyVerboseCheck :: Name -> ExpQ
- monomorphic :: Name -> ExpQ
- labelledExamples :: Testable prop => prop -> IO ()
- labelledExamplesWith :: Testable prop => Args -> prop -> IO ()
- labelledExamplesResult :: Testable prop => prop -> IO Result
- labelledExamplesWithResult :: Testable prop => Args -> prop -> IO Result
- newtype QC = QC Property
- optionSetToArgs :: OptionSet -> IO (Int, Args)
Documentation
testProperty :: Testable a => TestName -> a -> TestTree Source #
Create a Test
for a QuickCheck Testable
property
testProperties :: TestName -> [(String, Property)] -> TestTree Source #
Create a test from a list of QuickCheck properties. To be used
with allProperties
. E.g.
tests :: TestTree tests = testProperties "Foo" $allProperties
newtype QuickCheckTests Source #
Number of test cases for QuickCheck to generate
Constructors
QuickCheckTests Int |
Instances
newtype QuickCheckReplay Source #
Constructors
QuickCheckReplay (Maybe Int) |
Instances
IsOption QuickCheckReplay Source # | |
Defined in Test.Tasty.QuickCheck |
newtype QuickCheckShowReplay Source #
If a test case fails unexpectedly, show the replay token
Constructors
QuickCheckShowReplay Bool |
Instances
IsOption QuickCheckShowReplay Source # | |
Defined in Test.Tasty.QuickCheck |
newtype QuickCheckMaxSize Source #
Size of the biggest test cases
Constructors
QuickCheckMaxSize Int |
Instances
newtype QuickCheckMaxRatio Source #
Maximum number of of discarded tests per successful test before giving up.
Constructors
QuickCheckMaxRatio Int |
Instances
newtype QuickCheckVerbose Source #
Show the test cases that QuickCheck generates
Constructors
QuickCheckVerbose Bool |
Instances
IsOption QuickCheckVerbose Source # | |
Defined in Test.Tasty.QuickCheck |
newtype QuickCheckMaxShrinks Source #
Number of shrinks allowed before QuickCheck will fail a test.
Since: 0.10.2
Constructors
QuickCheckMaxShrinks Int |
Instances
Re-export of Test.QuickCheck
Constructors
Fun (a :-> b, b, Shrunk) (a -> b) |
class CoArbitrary a where #
Minimal complete definition
Nothing
Methods
coarbitrary :: a -> Gen b -> Gen b #
Instances
class Arbitrary2 (f :: Type -> Type -> Type) where #
Minimal complete definition
Methods
liftArbitrary2 :: Gen a -> Gen b -> Gen (f a b) #
liftShrink2 :: (a -> [a]) -> (b -> [b]) -> f a b -> [f a b] #
Instances
Arbitrary2 Either | |
Defined in Test.QuickCheck.Arbitrary Methods liftArbitrary2 :: Gen a -> Gen b -> Gen (Either a b) # liftShrink2 :: (a -> [a]) -> (b -> [b]) -> Either a b -> [Either a b] # | |
Arbitrary2 (,) | |
Defined in Test.QuickCheck.Arbitrary Methods liftArbitrary2 :: Gen a -> Gen b -> Gen (a, b) # liftShrink2 :: (a -> [a]) -> (b -> [b]) -> (a, b) -> [(a, b)] # | |
Arbitrary2 (Const :: Type -> Type -> Type) | |
Defined in Test.QuickCheck.Arbitrary Methods liftArbitrary2 :: Gen a -> Gen b -> Gen (Const a b) # liftShrink2 :: (a -> [a]) -> (b -> [b]) -> Const a b -> [Const a b] # | |
Arbitrary2 (Constant :: Type -> Type -> Type) | |
Defined in Test.QuickCheck.Arbitrary Methods liftArbitrary2 :: Gen a -> Gen b -> Gen (Constant a b) # liftShrink2 :: (a -> [a]) -> (b -> [b]) -> Constant a b -> [Constant a b] # |
class Arbitrary1 (f :: Type -> Type) where #
Minimal complete definition
Instances
Minimal complete definition
Instances
newtype PrintableString #
Constructors
PrintableString | |
Fields |
Instances
Arbitrary PrintableString | |
Defined in Test.QuickCheck.Modifiers | |
Read PrintableString | |
Defined in Test.QuickCheck.Modifiers | |
Show PrintableString | |
Defined in Test.QuickCheck.Modifiers | |
Eq PrintableString | |
Defined in Test.QuickCheck.Modifiers Methods (==) :: PrintableString -> PrintableString -> Bool Source # (/=) :: PrintableString -> PrintableString -> Bool Source # | |
Ord PrintableString | |
Defined in Test.QuickCheck.Modifiers Methods compare :: PrintableString -> PrintableString -> Ordering Source # (<) :: PrintableString -> PrintableString -> Bool Source # (<=) :: PrintableString -> PrintableString -> Bool Source # (>) :: PrintableString -> PrintableString -> Bool Source # (>=) :: PrintableString -> PrintableString -> Bool Source # max :: PrintableString -> PrintableString -> PrintableString Source # min :: PrintableString -> PrintableString -> PrintableString Source # |
newtype UnicodeString #
Constructors
UnicodeString | |
Fields |
Instances
Arbitrary UnicodeString | |
Defined in Test.QuickCheck.Modifiers | |
Read UnicodeString | |
Defined in Test.QuickCheck.Modifiers | |
Show UnicodeString | |
Defined in Test.QuickCheck.Modifiers | |
Eq UnicodeString | |
Defined in Test.QuickCheck.Modifiers Methods (==) :: UnicodeString -> UnicodeString -> Bool Source # (/=) :: UnicodeString -> UnicodeString -> Bool Source # | |
Ord UnicodeString | |
Defined in Test.QuickCheck.Modifiers Methods compare :: UnicodeString -> UnicodeString -> Ordering Source # (<) :: UnicodeString -> UnicodeString -> Bool Source # (<=) :: UnicodeString -> UnicodeString -> Bool Source # (>) :: UnicodeString -> UnicodeString -> Bool Source # (>=) :: UnicodeString -> UnicodeString -> Bool Source # max :: UnicodeString -> UnicodeString -> UnicodeString Source # min :: UnicodeString -> UnicodeString -> UnicodeString Source # |
newtype ASCIIString #
Constructors
ASCIIString | |
Fields |
Instances
Arbitrary ASCIIString | |
Defined in Test.QuickCheck.Modifiers | |
Read ASCIIString | |
Defined in Test.QuickCheck.Modifiers | |
Show ASCIIString | |
Defined in Test.QuickCheck.Modifiers | |
Eq ASCIIString | |
Defined in Test.QuickCheck.Modifiers Methods (==) :: ASCIIString -> ASCIIString -> Bool Source # (/=) :: ASCIIString -> ASCIIString -> Bool Source # | |
Ord ASCIIString | |
Defined in Test.QuickCheck.Modifiers Methods compare :: ASCIIString -> ASCIIString -> Ordering Source # (<) :: ASCIIString -> ASCIIString -> Bool Source # (<=) :: ASCIIString -> ASCIIString -> Bool Source # (>) :: ASCIIString -> ASCIIString -> Bool Source # (>=) :: ASCIIString -> ASCIIString -> Bool Source # max :: ASCIIString -> ASCIIString -> ASCIIString Source # min :: ASCIIString -> ASCIIString -> ASCIIString Source # |
class ShrinkState s a where #
Constructors
Shrinking s a |
Constructors
Shrink2 | |
Fields
|
Instances
Instances
Instances
newtype NonPositive a #
Constructors
NonPositive | |
Fields
|
Instances
newtype NonNegative a #
Constructors
NonNegative | |
Fields
|
Instances
Constructors
NonZero | |
Fields
|
Instances
Functor NonZero | |
(Num a, Eq a, Arbitrary a) => Arbitrary (NonZero a) | |
Enum a => Enum (NonZero a) | |
Defined in Test.QuickCheck.Modifiers Methods succ :: NonZero a -> NonZero a Source # pred :: NonZero a -> NonZero a Source # toEnum :: Int -> NonZero a Source # fromEnum :: NonZero a -> Int Source # enumFrom :: NonZero a -> [NonZero a] Source # enumFromThen :: NonZero a -> NonZero a -> [NonZero a] Source # enumFromTo :: NonZero a -> NonZero a -> [NonZero a] Source # enumFromThenTo :: NonZero a -> NonZero a -> NonZero a -> [NonZero a] Source # | |
Read a => Read (NonZero a) | |
Show a => Show (NonZero a) | |
Eq a => Eq (NonZero a) | |
Ord a => Ord (NonZero a) | |
Defined in Test.QuickCheck.Modifiers |
Constructors
Negative | |
Fields
|
Instances
Functor Negative | |
(Num a, Ord a, Arbitrary a) => Arbitrary (Negative a) | |
Enum a => Enum (Negative a) | |
Defined in Test.QuickCheck.Modifiers Methods succ :: Negative a -> Negative a Source # pred :: Negative a -> Negative a Source # toEnum :: Int -> Negative a Source # fromEnum :: Negative a -> Int Source # enumFrom :: Negative a -> [Negative a] Source # enumFromThen :: Negative a -> Negative a -> [Negative a] Source # enumFromTo :: Negative a -> Negative a -> [Negative a] Source # enumFromThenTo :: Negative a -> Negative a -> Negative a -> [Negative a] Source # | |
Read a => Read (Negative a) | |
Show a => Show (Negative a) | |
Eq a => Eq (Negative a) | |
Ord a => Ord (Negative a) | |
Defined in Test.QuickCheck.Modifiers Methods compare :: Negative a -> Negative a -> Ordering Source # (<) :: Negative a -> Negative a -> Bool Source # (<=) :: Negative a -> Negative a -> Bool Source # (>) :: Negative a -> Negative a -> Bool Source # (>=) :: Negative a -> Negative a -> Bool Source # |
Constructors
Positive | |
Fields
|
Instances
Functor Positive | |
(Num a, Ord a, Arbitrary a) => Arbitrary (Positive a) | |
Enum a => Enum (Positive a) | |
Defined in Test.QuickCheck.Modifiers Methods succ :: Positive a -> Positive a Source # pred :: Positive a -> Positive a Source # toEnum :: Int -> Positive a Source # fromEnum :: Positive a -> Int Source # enumFrom :: Positive a -> [Positive a] Source # enumFromThen :: Positive a -> Positive a -> [Positive a] Source # enumFromTo :: Positive a -> Positive a -> [Positive a] Source # enumFromThenTo :: Positive a -> Positive a -> Positive a -> [Positive a] Source # | |
Read a => Read (Positive a) | |
Show a => Show (Positive a) | |
Eq a => Eq (Positive a) | |
Ord a => Ord (Positive a) | |
Defined in Test.QuickCheck.Modifiers Methods compare :: Positive a -> Positive a -> Ordering Source # (<) :: Positive a -> Positive a -> Bool Source # (<=) :: Positive a -> Positive a -> Bool Source # (>) :: Positive a -> Positive a -> Bool Source # (>=) :: Positive a -> Positive a -> Bool Source # |
newtype SortedList a #
Instances
data InfiniteList a #
Constructors
InfiniteList | |
Fields
|
Instances
Arbitrary a => Arbitrary (InfiniteList a) | |
Defined in Test.QuickCheck.Modifiers | |
Show a => Show (InfiniteList a) | |
Defined in Test.QuickCheck.Modifiers |
newtype NonEmptyList a #
Constructors
NonEmpty | |
Fields
|
Instances
newtype OrderedList a #
Constructors
Ordered | |
Fields
|
Instances
Instances
Instances
Minimal complete definition
Nothing
Instances
Constructors
Discard |
Minimal complete definition
Methods
property :: prop -> Property #
propertyForAllShrinkShow :: Gen a -> (a -> [a]) -> (a -> [String]) -> (a -> prop) -> Property #
Instances
Testable Discard | |
Testable Prop | |
Defined in Test.QuickCheck.Property | |
Testable Property | |
Testable Result | |
Defined in Test.QuickCheck.Property | |
Testable () | |
Defined in Test.QuickCheck.Property | |
Testable Bool | |
Testable prop => Testable (Gen prop) | |
Testable prop => Testable (Maybe prop) | |
(Arbitrary a, Show a, Testable prop) => Testable (a -> prop) | |
Defined in Test.QuickCheck.Property |
failingClasses :: Result -> Set String #
failingLabels :: Result -> [String] #
failingTestCase :: Result -> [String] #
theException :: Result -> Maybe AnException #
numShrinkFinal :: Result -> Int #
numShrinkTries :: Result -> Int #
numShrinks :: Result -> Int #
numDiscarded :: Result -> Int #
pattern NoExpectedFailure :: Int -> Int -> !(Map [String] Int) -> !(Map String Int) -> !(Map String (Map String Int)) -> String -> Result #
pattern Failure :: Int -> Int -> Int -> Int -> Int -> QCGen -> Int -> String -> Maybe AnException -> String -> [String] -> [String] -> Set String -> Result #
pattern Success :: Int -> Int -> !(Map [String] Int) -> !(Map String Int) -> !(Map String (Map String Int)) -> String -> Result #
pattern GaveUp :: Int -> Int -> !(Map [String] Int) -> !(Map String Int) -> !(Map String (Map String Int)) -> String -> Result #
chooseEnum :: Enum a => (a, a) -> Gen a #
chooseBoundedIntegral :: (Bounded a, Integral a) => (a, a) -> Gen a #
suchThatMap :: Gen a -> (a -> Maybe b) -> Gen b #
growingElements :: [a] -> Gen a #
infiniteListOf :: Gen a -> Gen [a] #
arbitrary1 :: (Arbitrary1 f, Arbitrary a) => Gen (f a) #
shrink1 :: (Arbitrary1 f, Arbitrary a) => f a -> [f a] #
arbitrary2 :: (Arbitrary2 f, Arbitrary a, Arbitrary b) => Gen (f a b) #
shrink2 :: (Arbitrary2 f, Arbitrary a, Arbitrary b) => f a b -> [f a b] #
genericShrink :: (Generic a, RecursivelyShrink (Rep a), GSubterms (Rep a) a) => a -> [a] #
recursivelyShrink :: (Generic a, RecursivelyShrink (Rep a)) => a -> [a] #
shrinkList :: (a -> [a]) -> [a] -> [[a]] #
applyArbitrary2 :: (Arbitrary a, Arbitrary b) => (a -> b -> r) -> Gen r #
applyArbitrary4 :: (Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d) => (a -> b -> c -> d -> r) -> Gen r #
arbitrarySizedIntegral :: Integral a => Gen a #
arbitrarySizedNatural :: Integral a => Gen a #
arbitrarySizedFractional :: Fractional a => Gen a #
arbitraryBoundedIntegral :: (Bounded a, Integral a) => Gen a #
arbitraryBoundedRandom :: (Bounded a, Random a) => Gen a #
arbitraryBoundedEnum :: (Bounded a, Enum a) => Gen a #
arbitrarySizedBoundedIntegral :: (Bounded a, Integral a) => Gen a #
shrinkNothing :: a -> [a] #
shrinkMapBy :: (a -> b) -> (b -> a) -> (a -> [a]) -> b -> [b] #
shrinkIntegral :: Integral a => a -> [a] #
shrinkBoundedEnum :: (Bounded a, Enum a, Eq a) => a -> [a] #
shrinkRealFrac :: RealFrac a => a -> [a] #
shrinkDecimal :: RealFrac a => a -> [a] #
coarbitraryIntegral :: Integral a => a -> Gen b -> Gen b #
coarbitraryReal :: Real a => a -> Gen b -> Gen b #
coarbitraryShow :: Show a => a -> Gen b -> Gen b #
coarbitraryEnum :: Enum a => a -> Gen b -> Gen b #
orderedList :: (Ord a, Arbitrary a) => Gen [a] #
infiniteList :: Arbitrary a => Gen [a] #
functionBoundedEnum :: (Eq a, Bounded a, Enum a) => (a -> b) -> a :-> b #
functionRealFrac :: RealFrac a => (a -> b) -> a :-> b #
functionIntegral :: Integral a => (a -> b) -> a :-> b #
functionShow :: (Show a, Read a) => (a -> c) -> a :-> c #
functionVoid :: (forall b. void -> b) -> void :-> c #
functionMap :: Function b => (a -> b) -> (b -> a) -> (a -> c) -> a :-> c #
ioProperty :: Testable prop => IO prop -> Property #
idempotentIOProperty :: Testable prop => IO prop -> Property #
noShrinking :: Testable prop => prop -> Property #
counterexample :: Testable prop => String -> prop -> Property #
printTestCase :: Testable prop => String -> prop -> Property #
verboseShrinking :: Testable prop => prop -> Property #
expectFailure :: Testable prop => prop -> Property #
withMaxSuccess :: Testable prop => Int -> prop -> Property #
checkCoverage :: Testable prop => prop -> Property #
checkCoverageWith :: Testable prop => Confidence -> prop -> Property #
discardAfter :: Testable prop => Int -> prop -> Property #
forAllBlind :: Testable prop => Gen a -> (a -> prop) -> Property #
forAllShrinkShow :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> Property #
forAllShrinkBlind :: Testable prop => Gen a -> (a -> [a]) -> (a -> prop) -> Property #
polyQuickCheck :: Name -> ExpQ #
polyVerboseCheck :: Name -> ExpQ #
monomorphic :: Name -> ExpQ #
labelledExamples :: Testable prop => prop -> IO () #
labelledExamplesWith :: Testable prop => Args -> prop -> IO () #
labelledExamplesResult :: Testable prop => prop -> IO Result #
labelledExamplesWithResult :: Testable prop => Args -> prop -> IO Result #
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).
optionSetToArgs :: OptionSet -> IO (Int, Args) Source #
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