hedgehog-0.6.1: Hedgehog will eat all your bugs.

Safe HaskellNone
LanguageHaskell98

Hedgehog.Internal.Runner

Contents

Synopsis

Running Individual Properties

check :: MonadIO m => Property -> m Bool Source #

Check a property.

recheck :: MonadIO m => Size -> Seed -> Property -> m () Source #

Check a property using a specific size and seed.

Running Groups of Properties

data RunnerConfig Source #

Configuration for a property test run.

Constructors

RunnerConfig 

Fields

checkParallel :: MonadIO m => Group -> m Bool Source #

Check a group of properties in parallel.

Warning: although this check function runs tests faster than checkSequential, it should be noted that it may cause problems with properties that are not self-contained. For example, if you have a group of tests which all use the same database table, you may find that they interfere with each other when being run in parallel.

Using Template Haskell for property discovery:

tests :: IO Bool
tests =
  checkParallel $$(discover)

With manually specified properties:

tests :: IO Bool
tests =
  checkParallel $ Group "Test.Example" [
      ("prop_reverse", prop_reverse)
    ]

checkSequential :: MonadIO m => Group -> m Bool Source #

Check a group of properties sequentially.

Using Template Haskell for property discovery:

tests :: IO Bool
tests =
  checkSequential $$(discover)

With manually specified properties:

tests :: IO Bool
tests =
  checkSequential $ Group "Test.Example" [
      ("prop_reverse", prop_reverse)
    ]

checkGroup :: MonadIO m => RunnerConfig -> Group -> m Bool Source #

Check a group of properties using the specified runner config.

Internal

checkReport :: forall m. MonadIO m => MonadCatch m => PropertyConfig -> Size -> Seed -> PropertyT m () -> (Report Progress -> m ()) -> m (Report Result) Source #