Create a Test for a SmallCheck Testable property
Moduletasty-smallcheck-0.8.2Haskell2010
Test.Tasty.SmallCheck
This module allows to use SmallCheck properties in tasty.
- 4 types
- 1 class
- 9 values
- Packagetasty-smallcheck-0.8.2
- Exports14
- LanguageHaskell2010
- LicenceMIT
- SourceSmallCheck.hs
The "depth" parameter for SmallCheck
Constructors
Instances7Enum, Eq, Integral, Num, Ord, Real, …
Enum SmallCheckDepthDefined in tasty-smallcheck-0.8.2 · Test.Tasty.SmallCheckEq SmallCheckDepthDefined in tasty-smallcheck-0.8.2 · Test.Tasty.SmallCheckIntegral SmallCheckDepthDefined in tasty-smallcheck-0.8.2 · Test.Tasty.SmallCheckNum SmallCheckDepthDefined in tasty-smallcheck-0.8.2 · Test.Tasty.SmallCheckOrd SmallCheckDepthDefined in tasty-smallcheck-0.8.2 · Test.Tasty.SmallCheckReal SmallCheckDepthDefined in tasty-smallcheck-0.8.2 · Test.Tasty.SmallCheckIsOption SmallCheckDepthDefined in tasty-smallcheck-0.8.2 · Test.Tasty.SmallCheck
The type of properties over the monad m.
Class of tests that can be run in a monad. For pure tests, it is
recommended to keep their types polymorphic in m rather than
specialising it to Data.Functor.Identity.
Instances4Testable
Monad m => Testable m BoolDefined in smallcheck-1.2.1.1 · Test.SmallCheck.Property(Monad m, m ~ n) => Testable n (Property m)Defined in smallcheck-1.2.1.1 · Test.SmallCheck.PropertyMonad m => Testable m (Either Reason Reason)Defined in smallcheck-1.2.1.1 · Test.SmallCheck.Property(Serial m a, Show a, Testable m b) => Testable m (a -> b)Defined in smallcheck-1.2.1.1 · Test.SmallCheck.Property
Run property with a modified depth. Affects all quantified variables in the property.
Quantify the function's argument over its series, but adjust the depth. This doesn't affect any subsequent variables.
Set the existential quantification context.
Set the uniqueness quantification context.
Bear in mind that \exists! x, y\colon p\, x \, y
is not the same as \exists! x \colon \exists! y \colon p \, x \, y .
For example, \exists! x \colon \exists! y \colon |x| = |y|
is true (it holds only when x=y=0),
but \exists! x, y \colon |x| = |y| is false
(there are many such pairs).
As is customary in mathematics,
existsUnique $ \x y -> p x y is equivalent to
existsUnique $ \(x, y) -> p x y and not to
existsUnique $ \x -> existsUnique $ \y -> p x y
(the latter, of course, may be explicitly written when desired).
That is, all the variables affected by the same uniqueness context are quantified simultaneously as a tuple.
Set the universal quantification context.
Execute a monadic test.
An explanation for the test outcome.
Maximum depth of generated test values.
For data values, it is the depth of nested constructor applications.
For functional values, it is both the depth of nested case analysis and the depth of results.