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 | None |

Language | Haskell2010 |

- anyP :: (a -> Property) -> [a] -> Property
- liftProperty :: Monad m => Property -> PropertyM m ()
- whenFailM :: Monad m => IO () -> Property -> PropertyM m ()
- alwaysP :: Int -> Property -> Property
- shrinkPair' :: (a -> [a]) -> (b -> [b]) -> (a, b) -> [(a, b)]
- shrinkPair :: (a -> [a]) -> (a, a) -> [(a, a)]
- forAllShrinkShow :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> Property
- forAllShrinkShowC :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> PropertyOf (a :&: Counterexample prop)
- nub :: Ord a => [a] -> [a]
- dropLast :: Int -> [a] -> [a]
- toLast :: Int -> [a] -> a
- getChanContents :: TChan a -> IO [a]

# Documentation

liftProperty :: Monad m => Property -> PropertyM m () Source #

Lifts a plain property into a monadic property.

alwaysP :: Int -> Property -> Property Source #

A property that tests `prop`

repeatedly `n`

times, failing as soon as any
of the tests of `prop`

fails.

shrinkPair' :: (a -> [a]) -> (b -> [b]) -> (a, b) -> [(a, b)] Source #

Given shrinkers for the components of a pair we can shrink the pair.

shrinkPair :: (a -> [a]) -> (a, a) -> [(a, a)] Source #

Same above, but for homogeneous pairs.

forAllShrinkShow :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> Property Source #

A variant of `forAllShrink`

with an explicit show
function.

forAllShrinkShowC :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> PropertyOf (a :&: Counterexample prop) Source #

getChanContents :: TChan a -> IO [a] Source #