HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletasty-1.5.3Haskell2010

Test.Tasty.Providers

API for test providers.

  • 4 types
  • 1 class
  • 4 values
  • Packagetasty-1.5.3
  • Exports9
  • LanguageHaskell2010
  • LicenceMIT
  • SourceProviders.hs
classclass Typeable t => IsTest t where
#

The interface to be implemented by a test provider.

The type t is the concrete representation of the test which is used by the provider.

Methods

  • run :: OptionSet -> t -> (Progress -> IO ()) -> IO Result

    Run the test

    This method should cleanly catch any exceptions in the code to test, and return them as part of the Result, see FailureReason for an explanation. It is ok for run to raise an exception if there is a problem with the test suite code itself (for example, if a file that should contain example data or expected output is not found).

  • testOptions :: Tagged t [OptionDescription]

    The list of options that affect execution of tests of this type

datadata Result
#

A test result.

Instances1Show
  • Show ResultDefined in tasty-1.5.3 · Test.Tasty.Core
datadata Progress
#

Test progress information.

This may be used by a runner to provide some feedback to the user while a long-running test is executing.

Constructors

Instances2Eq, Show
datadata TestTree
#

The main data structure defining a test suite.

It consists of individual test cases and properties, organized in named groups which form a tree-like hierarchy.

There is no generic way to create a test case. Instead, every test provider (tasty-hunit, tasty-smallcheck etc.) provides a function to turn a test case into a TestTree.

Groups can be created using testGroup.