HUnit-Plus-2.0.0: A test framework building on HUnit.

Safe HaskellNone
LanguageHaskell2010

Test.HUnitPlus.Execution

Description

Functions for executing test cases, test paths, and test suites. These functions are provided for the sake of convenience and testing; however, the preferred way of using HUnit-Plus is to use the Test.HUnitPlus.Main to create a test program directly from a list of test suites.

Synopsis

Documentation

performTestCase Source #

Arguments

:: Reporter us

Report generator for the test run.

-> State

HUnit-Plus internal state.

-> us

State for the report generator.

-> TestInstance

The test to be executed.

-> IO (State, us) 

Execute an individual test case.

performTest Source #

Arguments

:: Reporter us

Report generator for the test run.

-> Selector

The selector to apply to all tests in the suite.

-> State

HUnit-Plus internal state.

-> us

State for the report generator.

-> Test

The test to be executed.

-> IO (State, us) 

Execute a given test (which may be a group), with the specified selector and report generators. Only tests which match the selector will be executed. The rest will be logged as skipped.

performTestSuite Source #

Arguments

:: Reporter us

Report generator to use for running the test suite.

-> HashMap Text (HashMap OptionMap Selector)

The map containing selectors for each suite.

-> us

State for the report generator.

-> TestSuite

Test suite to be run.

-> IO (Counts, us) 

performTestSuites Source #

Arguments

:: Reporter us

Report generator to use for running the test suite.

-> HashMap Text (HashMap OptionMap Selector)

The processed filter to use.

-> [TestSuite]

Test suite to be run.

-> IO (Counts, us) 

Top-level function for a test run. Given a set of suites and a map from suite names to selectors, execute all suites that have selectors. For any test suite, only the tests specified by its selector will be executed; the rest will be logged as skipped. Suites that do not have a selector will be omitted entirely, and their tests will not be logged as skipped.