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

Test.Tasty.Discover.Internal.Generator

Description

The test generator boilerplate module.

Any test that is supported (HUnit, HSpec, etc.) provides here, a generator type with all the context necessary for outputting the necessary boilerplate for the generated main function that will run all the tests.

Synopsis

Types

data Generator Source #

The generator type.

Constructors

Generator 

Fields

Instances

Instances details
Generic Generator Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Generator

Associated Types

type Rep Generator 
Instance details

Defined in Test.Tasty.Discover.Internal.Generator

type Rep Generator = D1 ('MetaData "Generator" "Test.Tasty.Discover.Internal.Generator" "tasty-discover-5.0.2-6rjTPUwNeYC1GOZUII5cak" 'False) (C1 ('MetaCons "Generator" 'PrefixI 'True) ((S1 ('MetaSel ('Just "generatorPrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "generatorImports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])) :*: (S1 ('MetaSel ('Just "generatorClass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "generatorSetup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Test -> String)))))
type Rep Generator Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Generator

type Rep Generator = D1 ('MetaData "Generator" "Test.Tasty.Discover.Internal.Generator" "tasty-discover-5.0.2-6rjTPUwNeYC1GOZUII5cak" 'False) (C1 ('MetaCons "Generator" 'PrefixI 'True) ((S1 ('MetaSel ('Just "generatorPrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "generatorImports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])) :*: (S1 ('MetaSel ('Just "generatorClass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "generatorSetup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Test -> String)))))

data Test Source #

The test type.

Constructors

Test 

Fields

Instances

Instances details
Generic Test Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Generator

Associated Types

type Rep Test 
Instance details

Defined in Test.Tasty.Discover.Internal.Generator

type Rep Test = D1 ('MetaData "Test" "Test.Tasty.Discover.Internal.Generator" "tasty-discover-5.0.2-6rjTPUwNeYC1GOZUII5cak" 'False) (C1 ('MetaCons "Test" 'PrefixI 'True) (S1 ('MetaSel ('Just "testModule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "testFunction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

Methods

from :: Test -> Rep Test x Source #

to :: Rep Test x -> Test Source #

Show Test Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Generator

Eq Test Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Generator

Methods

(==) :: Test -> Test -> Bool Source #

(/=) :: Test -> Test -> Bool Source #

Ord Test Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Generator

type Rep Test Source # 
Instance details

Defined in Test.Tasty.Discover.Internal.Generator

type Rep Test = D1 ('MetaData "Test" "Test.Tasty.Discover.Internal.Generator" "tasty-discover-5.0.2-6rjTPUwNeYC1GOZUII5cak" 'False) (C1 ('MetaCons "Test" 'PrefixI 'True) (S1 ('MetaSel ('Just "testModule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "testFunction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

Generators

generators :: [Generator] Source #

All types of tests supported for boilerplate generation.

getGenerator :: Test -> Generator Source #

Generator retriever (single).

getGenerators :: [Test] -> [Generator] Source #

Generator retriever (many).

Boilerplate Formatter

showSetup :: Test -> String -> String Source #

Boilerplate formatter.

Type Constructor

mkTest :: FilePath -> String -> Test Source #

Test constructor.