tasty-discover-5.2.0: Test discovery for the tasty framework.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Tasty.Discover.Internal.Config

Description

The test driver configuration options module.

Anything that can be passed as an argument to the test driver definition exists as a field in the Config type.

Synopsis

Configuration Options

data Config Source #

The discovery and runner configuration.

Constructors

Config 

Fields

Instances

Instances details
Generic Config Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

Associated Types

type Rep Config 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

type Rep Config

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

Show Config Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

type Rep Config Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

type Rep Config

type GlobPattern = String Source #

A glob pattern.

newtype SkipTest Source #

Newtype wrapper for skip test option.

This option type integrates with Tasty's option system to control whether tests should be skipped. When set to SkipTest True, tests will show as [SKIPPED] in yellow in the test output and won't actually execute.

Used internally by the skip function and Flavored type to implement test skipping functionality.

Constructors

SkipTest Bool 

Instances

Instances details
Generic SkipTest Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

Associated Types

type Rep SkipTest 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

type Rep SkipTest = D1 ('MetaData "SkipTest" "Test.Tasty.Discover.Internal.Config" "tasty-discover-5.2.0-6BjWLNiFeo66Uowhh0b9lW" 'True) (C1 ('MetaCons "SkipTest" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

Methods

from :: SkipTest -> Rep SkipTest x #

to :: Rep SkipTest x -> SkipTest #

Show SkipTest Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

Eq SkipTest Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

IsOption SkipTest Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

type Rep SkipTest Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Config

type Rep SkipTest = D1 ('MetaData "SkipTest" "Test.Tasty.Discover.Internal.Config" "tasty-discover-5.2.0-6BjWLNiFeo66Uowhh0b9lW" 'True) (C1 ('MetaCons "SkipTest" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

newtype OnPlatform Source #

Newtype wrapper for platform-specific test filtering.

This option type allows tests to be conditionally executed based on platform criteria. The wrapped function takes a platform string and returns whether the test should run on that platform.

Platform values correspond to System.Info.os: - "linux" for Linux systems - "darwin" for macOS - "mingw32" for Windows (GHC compiled) - "unix" matches both "linux" and "darwin"

Example usage: @ -- Only run on Linux onLinux :: OnPlatform onLinux = OnPlatform (== "linux")

  • - Run on Unix-like systems onUnix :: OnPlatform onUnix = OnPlatform (p -> p elem ["linux", "darwin"]) @

Constructors

OnPlatform (String -> Bool) 

checkPlatform :: OnPlatform -> Bool Source #

Check if the current platform matches the OnPlatform criteria

onLinux :: OnPlatform Source #

Helper function: only run on Linux

onDarwin :: OnPlatform Source #

Helper function: only run on macOS

onWindows :: OnPlatform Source #

Helper function: only run on Windows (mingw32)

onUnix :: OnPlatform Source #

Helper function: only run on Unix-like systems (Linux or macOS)

Configuration Parser

parseConfig :: FilePath -> String -> [String] -> Either String Config Source #

Configuration options parser.

Configuration Defaults

defaultConfig :: FilePath -> Config Source #

The default configuration