quickcheck-state-machine-0.1.0: Test monadic programs using state machine based models

Copyright(C) 2017 ATS Advanced Telematic Systems GmbH
LicenseBSD-style (see the file LICENSE)
MaintainerStevan Andjelkovic <stevan@advancedtelematic.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe
LanguageHaskell2010

Test.StateMachine.Internal.Utils

Description

This module exports some QuickCheck utility functions. Some of these should perhaps be upstreamed.

Synopsis

Documentation

anyP :: (a -> Property) -> [a] -> Property Source #

Lifts any to properties.

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.