Test.Tasty.Ingredients.Basic

tasty-0.11.2.3: Modern and extensible testing framework

Safe Haskell | None
Language | Haskell2010

Test.Tasty.Ingredients.Basic

Contents

- Console test reporter
- Listing tests
- Adding options

Description

This module exports the basic ingredients defined in the `tasty` packages.

Note that if `defaultIngredients` from Test.Tasty suits your needs, use that instead of importing this module.

Synopsis

- consoleTestReporter :: Ingredient
- newtype Quiet = Quiet Bool
- newtype HideSuccesses = HideSuccesses Bool
- listingTests :: Ingredient
- newtype ListTests = ListTests Bool
- testsNames :: OptionSet -> TestTree -> [TestName]
- includingOptions :: [OptionDescription] -> Ingredient

## Console test reporter

consoleTestReporter :: Ingredient #

A simple console UI

newtype Quiet #

Do not print test results (see README for details)

Constructors

Quiet Bool |

Instances

Eq Quiet # |
Methods (==) :: Quiet -> Quiet -> Bool # (/=) :: Quiet -> Quiet -> Bool #
Ord Quiet # |
Methods compare :: Quiet -> Quiet -> Ordering # (<) :: Quiet -> Quiet -> Bool # (<=) :: Quiet -> Quiet -> Bool # (>) :: Quiet -> Quiet -> Bool # (>=) :: Quiet -> Quiet -> Bool # max :: Quiet -> Quiet -> Quiet # min :: Quiet -> Quiet -> Quiet #
IsOption Quiet # |
Methods defaultValue :: Quiet # parseValue :: String -> Maybe Quiet # optionName :: Tagged * Quiet String # optionHelp :: Tagged * Quiet String # optionCLParser :: Parser Quiet #

newtype HideSuccesses #

Report only failed tests

Constructors

HideSuccesses Bool |

Instances

Eq HideSuccesses # |
Methods (==) :: HideSuccesses -> HideSuccesses -> Bool # (/=) :: HideSuccesses -> HideSuccesses -> Bool #
Ord HideSuccesses # |
Methods compare :: HideSuccesses -> HideSuccesses -> Ordering # (<) :: HideSuccesses -> HideSuccesses -> Bool # (<=) :: HideSuccesses -> HideSuccesses -> Bool # (>) :: HideSuccesses -> HideSuccesses -> Bool # (>=) :: HideSuccesses -> HideSuccesses -> Bool # max :: HideSuccesses -> HideSuccesses -> HideSuccesses # min :: HideSuccesses -> HideSuccesses -> HideSuccesses #
IsOption HideSuccesses # |
Methods defaultValue :: HideSuccesses # parseValue :: String -> Maybe HideSuccesses # optionName :: Tagged * HideSuccesses String # optionHelp :: Tagged * HideSuccesses String # optionCLParser :: Parser HideSuccesses #

## Listing tests

listingTests :: Ingredient #

The ingredient that provides the test listing functionality

newtype ListTests #

This option, when set to `True`, specifies that we should run in the «list tests» mode

Constructors

ListTests Bool |

Instances

Eq ListTests # |
Methods (==) :: ListTests -> ListTests -> Bool # (/=) :: ListTests -> ListTests -> Bool #
Ord ListTests # |
Methods compare :: ListTests -> ListTests -> Ordering # (<) :: ListTests -> ListTests -> Bool # (<=) :: ListTests -> ListTests -> Bool # (>) :: ListTests -> ListTests -> Bool # (>=) :: ListTests -> ListTests -> Bool # max :: ListTests -> ListTests -> ListTests # min :: ListTests -> ListTests -> ListTests #
IsOption ListTests # |
Methods defaultValue :: ListTests # parseValue :: String -> Maybe ListTests # optionName :: Tagged * ListTests String # optionHelp :: Tagged * ListTests String # optionCLParser :: Parser ListTests #

testsNames :: OptionSet -> TestTree -> [TestName] #

Obtain the list of all tests in the suite

## Adding options

includingOptions :: [OptionDescription] -> Ingredient #

This ingredient doesn't do anything apart from registering additional options.

The option values can be accessed using `askOption`.