hspec-core-2.11.16: A Testing Framework for Haskell

Safe Haskell | None
Language | Haskell2010

Test.Hspec.Core.Extension.Config

Contents

- Types
- Operations

Description

Warning: This API is experimental.

Synopsis

- data Config = Config {
  - configIgnoreConfigFile :: Bool
  - configDryRun :: Bool
  - configFocusedOnly :: Bool
  - configFailOnEmpty :: Bool
  - configFailOnFocused :: Bool
  - configFailOnPending :: Bool
  - configFailOnEmptyDescription :: Bool
  - configPrintSlowItems :: Maybe Int
  - configPrintCpuTime :: Bool
  - configFailFast :: Bool
  - configRandomize :: Bool
  - configSeed :: Maybe Integer
  - configQuickCheckSeed :: Maybe Integer
  - configFailureReport :: Maybe FilePath
  - configRerun :: Bool
  - configRerunAllOnSuccess :: Bool
  - configFilterPredicate :: Maybe (Path -> Bool)
  - configSkipPredicate :: Maybe (Path -> Bool)
  - configQuickCheckMaxSuccess :: Maybe Int
  - configQuickCheckMaxDiscardRatio :: Maybe Int
  - configQuickCheckMaxSize :: Maybe Int
  - configQuickCheckMaxShrinks :: Maybe Int
  - configSmallCheckDepth :: Maybe Int
  - configColorMode :: ColorMode
  - configUnicodeMode :: UnicodeMode
  - configDiff :: Bool
  - configDiffContext :: Maybe Int
  - configExternalDiff :: Maybe (Maybe Int -> String -> String -> IO ())
  - configPrettyPrint :: Bool
  - configPrettyPrintFunction :: Bool -> String -> String -> (String, String)
  - configFormatException :: SomeException -> String
  - configTimes :: Bool
  - configExpertMode :: Bool
  - configAvailableFormatters :: [(String, FormatConfig -> IO Format)]
  - configFormat :: Maybe (FormatConfig -> IO Format)
  - configFormatter :: Maybe Formatter
  - configHtmlOutput :: Bool
  - configConcurrentJobs :: Maybe Int
  - configAnnotations :: Annotations
  }
- type Path = ([String], String)
- data ColorMode
  - = ColorAuto
  - | ColorNever
  - | ColorAlways
- data UnicodeMode
  - = UnicodeAuto
  - | UnicodeNever
  - | UnicodeAlways
- setAnnotation :: Typeable value => value -> Config -> Config
- getAnnotation :: Typeable value => Config -> Maybe value

# Types

data Config Source #

Constructors

Config |

Fields

- configIgnoreConfigFile :: Bool
- configDryRun :: Bool
- configFocusedOnly :: Bool
- configFailOnEmpty :: Bool
- configFailOnFocused :: Bool
- configFailOnPending :: Bool
- configFailOnEmptyDescription :: Bool
- configPrintSlowItems :: Maybe Int
- configPrintCpuTime :: Bool
- configFailFast :: Bool
- configRandomize :: Bool
- configSeed :: Maybe Integer
- configQuickCheckSeed :: Maybe Integer

  Deprecated: Use `configSeed` instead.

- configFailureReport :: Maybe FilePath
- configRerun :: Bool
- configRerunAllOnSuccess :: Bool
- configFilterPredicate :: Maybe (Path -> Bool)
- configSkipPredicate :: Maybe (Path -> Bool)
- configQuickCheckMaxSuccess :: Maybe Int
- configQuickCheckMaxDiscardRatio :: Maybe Int
- configQuickCheckMaxSize :: Maybe Int
- configQuickCheckMaxShrinks :: Maybe Int
- configSmallCheckDepth :: Maybe Int
- configColorMode :: ColorMode
- configUnicodeMode :: UnicodeMode
- configDiff :: Bool
- configDiffContext :: Maybe Int
- configExternalDiff :: Maybe (Maybe Int -> String -> String -> IO ())
- configPrettyPrint :: Bool
- configPrettyPrintFunction :: Bool -> String -> String -> (String, String)
- configFormatException :: SomeException -> String

  Since: 2.11.5

- configTimes :: Bool
- configExpertMode :: Bool

  Since: 2.11.2

- configAvailableFormatters :: [(String, FormatConfig -> IO Format)]

  Since: 2.9.0

- configFormat :: Maybe (FormatConfig -> IO Format)
- configFormatter :: Maybe Formatter

  Deprecated: Use `useFormatter` instead.

- configHtmlOutput :: Bool
- configConcurrentJobs :: Maybe Int
- configAnnotations :: Annotations

type Path = ([String], String) Source #

A `Path` describes the location of a spec item within a spec tree.

It consists of a list of group descriptions and a requirement description.

Since: 2.0.0

data ColorMode Source #

Constructors

ColorAuto |
ColorNever |
ColorAlways |

#### Instances

Instances details

Show ColorMode Source # |
Instance details Defined in Test.Hspec.Core.Config.Definition Methods showsPrec :: Int -> ColorMode -> ShowS Source # show :: ColorMode -> String Source # showList :: [ColorMode] -> ShowS Source #
Eq ColorMode Source # |
Instance details Defined in Test.Hspec.Core.Config.Definition Methods (==) :: ColorMode -> ColorMode -> Bool Source # (/=) :: ColorMode -> ColorMode -> Bool Source #

data UnicodeMode Source #

Constructors

UnicodeAuto |
UnicodeNever |
UnicodeAlways |

#### Instances

Instances details

Show UnicodeMode Source # |
Instance details Defined in Test.Hspec.Core.Config.Definition Methods showsPrec :: Int -> UnicodeMode -> ShowS Source # show :: UnicodeMode -> String Source # showList :: [UnicodeMode] -> ShowS Source #
Eq UnicodeMode Source # |
Instance details Defined in Test.Hspec.Core.Config.Definition Methods (==) :: UnicodeMode -> UnicodeMode -> Bool Source # (/=) :: UnicodeMode -> UnicodeMode -> Bool Source #

# Operations

setAnnotation :: Typeable value => value -> Config -> Config Source #

getAnnotation :: Typeable value => Config -> Maybe value Source #