Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Test.Tasty.Hedgehog
Description
This package lets you test Hedgehog properties with tasty.
Typical usage would look like this:
testGroup "tasty-hedgehog tests" [ testPropertyNamed "reverse involutive" "prop_reverse_involutive" prop_reverse_involutive , testPropertyNamed "sort idempotent" "prop_sort_idempotent" prop_sort_idempotent ]
Synopsis
- testProperty :: TestName -> Property -> TestTree
- testPropertyNamed :: TestName -> PropertyName -> Property -> TestTree
- fromGroup :: Group -> TestTree
- newtype HedgehogReplay = HedgehogReplay (Maybe (Skip, Seed))
- newtype HedgehogShowReplay = HedgehogShowReplay Bool
- newtype HedgehogTestLimit = HedgehogTestLimit (Maybe TestLimit)
- newtype HedgehogDiscardLimit = HedgehogDiscardLimit (Maybe DiscardLimit)
- newtype HedgehogShrinkLimit = HedgehogShrinkLimit (Maybe ShrinkLimit)
- newtype HedgehogShrinkRetries = HedgehogShrinkRetries (Maybe ShrinkRetries)
Documentation
testPropertyNamed :: TestName -> PropertyName -> Property -> TestTree Source #
testPropertyNamed
testName propertyName property
creates a
TestTree
from property
using testName
as the displayed
description for the property. The propertyName
is used by Hedgehog
when a failure occurs to provide instructions for how to re-run
the property and should normally be set to a string representation
of the property
argument.
testPropertyNamed "reverse is involutive" "prop_reverse_involutive" prop_reverse_involutive
Since: 1.2.0.0
Options you can pass in via tasty
newtype HedgehogReplay Source #
The replay token to use for replaying a previous test run
Constructors
HedgehogReplay (Maybe (Skip, Seed)) |
Instances
IsOption HedgehogReplay Source # | |
Defined in Test.Tasty.Hedgehog Methods defaultValue :: HedgehogReplay Source # parseValue :: String -> Maybe HedgehogReplay Source # optionName :: Tagged HedgehogReplay String Source # optionHelp :: Tagged HedgehogReplay String Source # showDefaultValue :: HedgehogReplay -> Maybe String Source # optionCLParser :: Parser HedgehogReplay Source # |
newtype HedgehogShowReplay Source #
If a test case fails, show a replay token for replaying tests
Constructors
HedgehogShowReplay Bool |
Instances
IsOption HedgehogShowReplay Source # | |
Defined in Test.Tasty.Hedgehog Methods defaultValue :: HedgehogShowReplay Source # parseValue :: String -> Maybe HedgehogShowReplay Source # optionName :: Tagged HedgehogShowReplay String Source # optionHelp :: Tagged HedgehogShowReplay String Source # showDefaultValue :: HedgehogShowReplay -> Maybe String Source # optionCLParser :: Parser HedgehogShowReplay Source # |
newtype HedgehogTestLimit Source #
The number of successful test cases required before Hedgehog will pass a test
Constructors
HedgehogTestLimit (Maybe TestLimit) |
Instances
newtype HedgehogDiscardLimit Source #
The number of discarded cases allowed before Hedgehog will fail a test
Constructors
HedgehogDiscardLimit (Maybe DiscardLimit) |
Instances
newtype HedgehogShrinkLimit Source #
The number of shrinks allowed before Hedgehog will fail a test
Constructors
HedgehogShrinkLimit (Maybe ShrinkLimit) |
Instances
newtype HedgehogShrinkRetries Source #
The number of times to re-run a test during shrinking
Constructors
HedgehogShrinkRetries (Maybe ShrinkRetries) |