quickcheck-property-monad-0.1: quickcheck-property-monad

Safe HaskellNone

Test.QuickCheck.Property.Monad

Description

Synopsis

Documentation

data PropM a Source

PropM is a monad for writing properties that depend on random data. This is especially useful if you have many invariants for your data and cannot simply write an Arbitrary instance.

assert :: String -> Bool -> PropM ()Source

Assert that a certain condition is true. If the condition is false, fail with the given error message.

failWith :: String -> PropM ()Source

Fail with the given error message.

generate :: Gen a -> PropM aSource

Use the given generator to generate a value.

logMessage :: String -> PropM ()Source

Log a message that will be printed when the test case fails.

logMessageLn :: String -> PropM ()Source

Like logMessage but appends a line break after the message.