hspec-core-2.11.10: A Testing Framework for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Hspec.Core.Extension.Item

Description

Warning: This API is experimental.

Synopsis

Types

data Item a Source #

Item is used to represent spec items internally. A spec item consists of:

  • a textual description of a desired behavior
  • an example for that behavior
  • additional meta information

Everything that is an instance of the Example type class can be used as an example, including QuickCheck properties, Hspec expectations and HUnit assertions.

Constructors

Item 

Fields

data Location Source #

Location is used to represent source locations.

data Params Source #

Instances

Instances details
Show Params Source # 
Instance details

Defined in Test.Hspec.Core.Example

type ActionWith a = a -> IO () Source #

An IO action that expects an argument of type a

type Progress = (Int, Int) Source #

data Result Source #

The result of running an example

Constructors

Result 

Instances

Instances details
Show Result Source # 
Instance details

Defined in Test.Hspec.Core.Example

Example Result Source # 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg Result Source #

Example (a -> Result) Source # 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg (a -> Result) Source #

Methods

evaluateExample :: (a -> Result) -> Params -> (ActionWith (Arg (a -> Result)) -> IO ()) -> ProgressCallback -> IO Result Source #

type Arg Result Source # 
Instance details

Defined in Test.Hspec.Core.Example

type Arg Result = ()
type Arg (a -> Result) Source # 
Instance details

Defined in Test.Hspec.Core.Example

type Arg (a -> Result) = a

Operations

setAnnotation :: Typeable value => value -> Item a -> Item a Source #

getAnnotation :: Typeable value => Item a -> Maybe value Source #