quickcheck-state-machine-0.2.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 HaskellNone
LanguageHaskell2010

Test.StateMachine.Internal.Utils

Description

 

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.

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

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

A property that tests prop repeatedly n times, failing as soon as any of the tests of prop fails.

shrinkPropertyHelperC :: Show a => PropertyOf a -> (a -> Bool) -> Property Source #

Write a metaproperty on the output of QuickChecking a property using a boolean predicate on the output.

shrinkPropertyHelperC' :: Show a => PropertyOf a -> (a -> Property) -> Property Source #

Same as above, but using a property predicate.

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.

nub :: Ord a => [a] -> [a] Source #

Remove duplicate elements from a list.

dropLast :: Int -> [a] -> [a] Source #

Drop last n elements of a list.

toLast :: Int -> [a] -> a Source #

Indexing starting from the back of a list.