Copyright | (C) 2017 ATS Advanced Telematic Systems GmbH |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Stevan Andjelkovic <stevan@advancedtelematic.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe |
Language | Haskell2010 |
This module exports some QuickCheck utility functions. Some of these should perhaps be upstreamed.
- anyP :: (a -> Property) -> [a] -> Property
- liftProperty :: Monad m => Property -> PropertyM m ()
- shrinkPropertyHelper :: Property -> (String -> Bool) -> Property
- shrinkPropertyHelper' :: Property -> (String -> Property) -> Property
- shrinkPair :: (a -> [a]) -> (a, a) -> [(a, a)]
- shrinkPair' :: (a -> [a]) -> (b -> [b]) -> (a, b) -> [(a, b)]
Documentation
liftProperty :: Monad m => Property -> PropertyM m () Source #
Lifts a plain property into a monadic property.
shrinkPropertyHelper :: Property -> (String -> Bool) -> Property Source #
Write a metaproperty on the output of QuickChecking a property using a boolean predicate on the output.
shrinkPropertyHelper' :: Property -> (String -> Property) -> Property Source #
Same as above, but using a property predicate.
shrinkPair :: (a -> [a]) -> (a, a) -> [(a, a)] Source #
Same above, but for homogeneous pairs.
shrinkPair' :: (a -> [a]) -> (b -> [b]) -> (a, b) -> [(a, b)] Source #
Given shrinkers for the components of a pair we can shrink the pair.