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 #

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 # |
Instance details Defined in Test.Tasty.Providers.ConsoleFormat Methods showsPrec :: Int -> ResultDetailsPrinter -> ShowS # show :: ResultDetailsPrinter -> String # showList :: [ResultDetailsPrinter] -> ShowS #

data ConsoleFormat #

Console output format

Since: 1.3.1

Constructors

ConsoleFormat |
Fields consoleIntensity :: ConsoleIntensity colorIntensity :: ColorIntensity color :: Color

type ConsoleFormatPrinter #

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 #

Noop result details printer. The default for most providers.

Since: 1.3.1

failFormat :: ConsoleFormat #

Format used to display failures

Since: 1.3.1

infoFailFormat :: ConsoleFormat #

Format used to display additional information on failures

Since: 1.3.1

infoOkFormat :: ConsoleFormat #

Format used to display additional information on sucesses

Since: 1.3.1

okFormat :: ConsoleFormat #

Format used to display sucesses

Since: 1.3.1

skippedFormat :: ConsoleFormat #

Format used to display skipped tests

Since: 1.3.1