tasty-1.5.3: Modern and extensible testing framework

Safe Haskell | Safe-Inferred
Language | Haskell2010

Test.Tasty.Providers.ConsoleFormat

Description

This module can be used by providers to perform colorful/formatted output and possibly re-use tasty's own output formats.

Since: 1.3.1

Synopsis

- newtype ResultDetailsPrinter = ResultDetailsPrinter (Int -> ConsoleFormatPrinter -> IO ())
- data ConsoleFormat = ConsoleFormat {
  - consoleIntensity :: ConsoleIntensity
  - colorIntensity :: ColorIntensity
  - color :: Color
  }
- type ConsoleFormatPrinter = ConsoleFormat -> IO () -> IO ()
- noResultDetails :: ResultDetailsPrinter
- failFormat :: ConsoleFormat
- infoFailFormat :: ConsoleFormat
- infoOkFormat :: ConsoleFormat
- okFormat :: ConsoleFormat
- skippedFormat :: ConsoleFormat

# Documentation

newtype ResultDetailsPrinter Source #

An action that prints additional information about a test using colors/formatting; see `testFailedDetails` and `resultDetailsPrinter`.

As input, this action is provided with the current indentation level and a `ConsoleFormatPrinter`, which tells it how perform output.

This is a newtype to allow a `Show` instance.

Since: 1.3.1

Constructors

ResultDetailsPrinter (Int -> ConsoleFormatPrinter -> IO ()) |

#### Instances

Instances details

Show ResultDetailsPrinter Source # |
Instance details Defined in Test.Tasty.Providers.ConsoleFormat Methods showsPrec :: Int -> ResultDetailsPrinter -> ShowS Source # show :: ResultDetailsPrinter -> String Source # showList :: [ResultDetailsPrinter] -> ShowS Source #

data ConsoleFormat Source #

Console output format

Since: 1.3.1

Constructors

ConsoleFormat |

Fields

- consoleIntensity :: ConsoleIntensity
- colorIntensity :: ColorIntensity
- color :: Color

type ConsoleFormatPrinter Source #

Arguments

= ConsoleFormat | selected console format
-> IO () | action to be executed with active console format
-> IO () |

Type of console format printer functions

Since: 1.3.1

noResultDetails :: ResultDetailsPrinter Source #

Noop result details printer. The default for most providers.

Since: 1.3.1

failFormat :: ConsoleFormat Source #

Format used to display failures

Since: 1.3.1

infoFailFormat :: ConsoleFormat Source #

Format used to display additional information on failures

Since: 1.3.1

infoOkFormat :: ConsoleFormat Source #

Format used to display additional information on sucesses

Since: 1.3.1

okFormat :: ConsoleFormat Source #

Format used to display sucesses

Since: 1.3.1

skippedFormat :: ConsoleFormat Source #

Format used to display skipped tests

Since: 1.3.1