Safe Haskell | None |
---|
This module integrates the QuickCheck
library into HTF. It re-exports
all functionality of QuickCheck
and defines some additional functions.
- module Test.QuickCheck
- defaultArgs :: Args
- getCurrentArgs :: IO Args
- setDefaultArgs :: Args -> IO ()
- withQCArgs :: (WithQCArgs a, Testable a) => (Args -> Args) -> a -> TestableWithQCArgs
- qcPending :: Testable t => String -> t -> t
- testableAsAssertion :: (Testable t, WithQCArgs t) => t -> Assertion
- asTestableWithQCArgs :: (WithQCArgs a, Testable a) => a -> TestableWithQCArgs
- data TestableWithQCArgs
- class WithQCArgs a
Documentation
module Test.QuickCheck
Arguments for evaluating properties
The Args
used if not explicitly changed.
getCurrentArgs :: IO ArgsSource
Retrieve the Args
currently used per default when evaluating quick check properties.
setDefaultArgs :: Args -> IO ()Source
Change the default Args
used to evaluate quick check properties.
:: (WithQCArgs a, Testable a) | |
=> (Args -> Args) | Modification function for the default |
-> a | Property |
-> TestableWithQCArgs |
Run a QuickCheck
property with modified quick check arguments Args
.
Pending properties
qcPending :: Testable t => String -> t -> tSource
Use qcPending msg prop
to mark the given quick check property as pending
without removing it from the test suite and without deleting or commenting out the property code.
Internal functions
testableAsAssertion :: (Testable t, WithQCArgs t) => t -> AssertionSource
Turns a QuickCheck
property into an Assertion
. This function
is used internally in the code generated by htfpp
, do not use it directly.
asTestableWithQCArgs :: (WithQCArgs a, Testable a) => a -> TestableWithQCArgsSource
Turns a QuickCheck
property with custom Args
into an Assertion
. This function
is used internally in the code generated by htfpp
, do not use it directly.
data TestableWithQCArgs Source
Abstract type for representing quick check properties with custom Args
.
Used only internally.
class WithQCArgs a Source
Type class providing access to the custom Args
of a quick check property.
Used only internally.