Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
Instances
IsTest HedgehogTest Source # | |
Defined in Test.Tasty.HedgehogTest 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
Instances
newtype HedgehogDiscardLimit Source #
The number of discarded cases allowed before Hedgehog will fail a test
Instances
newtype HedgehogShrinkLimit Source #
The number of shrinks allowed before Hedgehog will fail a test
Instances
newtype HedgehogShrinkRetries Source #
The number of times to re-run a test during shrinking
Instances
newtype HedgehogReplay Source #
The replay token to use for replaying a previous test run
HedgehogReplay (Maybe (Size, Seed)) |
Instances
IsOption HedgehogReplay Source # | |
Defined in Test.Tasty.HedgehogTest 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
Instances
IsOption HedgehogShowReplay Source # | |
Defined in Test.Tasty.HedgehogTest 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
Instances
Show ModuleName Source # | |
Defined in Test.Tasty.HedgehogTest showsPrec :: Int -> ModuleName -> ShowS # show :: ModuleName -> String # showList :: [ModuleName] -> ShowS # | |
Eq ModuleName Source # | |
Defined in Test.Tasty.HedgehogTest (==) :: ModuleName -> ModuleName -> Bool # (/=) :: ModuleName -> ModuleName -> Bool # | |
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 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