| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Test.Tasty.HedgehogTest
Contents
Description
This redefines the HedgehogTest from tasty-hedgehog to display color during the reporting
Synopsis
- data HedgehogTest = HedgehogTest TestName Property
- newtype HedgehogTestLimit = HedgehogTestLimit (Maybe TestLimit)
- newtype HedgehogDiscardLimit = HedgehogDiscardLimit (Maybe DiscardLimit)
- newtype HedgehogShrinkLimit = HedgehogShrinkLimit (Maybe ShrinkLimit)
- newtype HedgehogShrinkRetries = HedgehogShrinkRetries (Maybe ShrinkRetries)
- newtype HedgehogReplay = HedgehogReplay (Maybe (Size, Seed))
- newtype HedgehogShowReplay = HedgehogShowReplay Bool
- newtype ModuleName = ModuleName Text
- testProperty :: TestName -> Property -> TestTree
- groupByModuleName :: TestTree -> TestTree
- getModuleName :: HasCallStack => String
Documentation
data HedgehogTest Source #
Hedgehog Property as a Tasty Test
Constructors
| HedgehogTest TestName Property |
Instances
| IsTest HedgehogTest Source # | |
Defined in Test.Tasty.HedgehogTest Methods run :: OptionSet -> HedgehogTest -> (Progress -> IO ()) -> IO Result testOptions :: Tagged HedgehogTest [OptionDescription] | |
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) |
Instances
newtype HedgehogReplay Source #
The replay token to use for replaying a previous test run
Constructors
| HedgehogReplay (Maybe (Size, Seed)) |
Instances
| IsOption HedgehogReplay Source # | |
Defined in Test.Tasty.HedgehogTest Methods defaultValue :: HedgehogReplay # parseValue :: String -> Maybe HedgehogReplay # optionName :: Tagged HedgehogReplay String # optionHelp :: Tagged HedgehogReplay String # showDefaultValue :: HedgehogReplay -> Maybe String # optionCLParser :: Parser HedgehogReplay # | |
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.HedgehogTest Methods defaultValue :: HedgehogShowReplay # parseValue :: String -> Maybe HedgehogShowReplay # optionName :: Tagged HedgehogShowReplay String # optionHelp :: Tagged HedgehogShowReplay String # showDefaultValue :: HedgehogShowReplay -> Maybe String # optionCLParser :: Parser HedgehogShowReplay # | |
newtype ModuleName Source #
Option describing the current module name
Constructors
| ModuleName Text |
Instances
| Show ModuleName Source # | |
Defined in Test.Tasty.HedgehogTest Methods showsPrec :: Int -> ModuleName -> ShowS # show :: ModuleName -> String # showList :: [ModuleName] -> ShowS # | |
| Eq ModuleName Source # | |
Defined in Test.Tasty.HedgehogTest | |
| IsOption ModuleName Source # | This option is not used on the command line, it is just used to annotate test groups |
Defined in Test.Tasty.HedgehogTest Methods parseValue :: String -> Maybe ModuleName # optionName :: Tagged ModuleName String # optionHelp :: Tagged ModuleName String # showDefaultValue :: ModuleName -> Maybe String # optionCLParser :: Parser ModuleName # | |
groupByModuleName :: TestTree -> TestTree Source #
This allows the discovery of Hedgehog properties and their grouping by module name in the test report. Extract the ModuleName option value for a given test and group all the tests with that option into the same test group
getModuleName :: HasCallStack => String Source #
Return the module name of the current callstack