hspec-core-2.11.16: A Testing Framework for Haskell
Safe HaskellNone
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 #

QuickCheck and SmallCheck related parameters.

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.

This type is what Examples are ultimately unlifted into for execution.

type Progress = (Int, Int) Source #

(CurrentItem, TotalItems) tuple.

type ProgressCallback = Progress -> IO () Source #

Callback used by composite test items that contain many tests to report their progress towards finishing them all.

This is used, for example, to report how many QuickCheck examples are finished.

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 
Instance details

Defined in Test.Hspec.Core.Example

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

Defined in Test.Hspec.Core.Example

Associated Types

type Arg (a -> Result) 
Instance details

Defined in Test.Hspec.Core.Example

type Arg (a -> Result) = a

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 #