quickpull-0.4.0.0: Generate Main module with QuickCheck tests

Safe HaskellSafe-Inferred
LanguageHaskell2010

Quickpull.Types

Synopsis

Documentation

data TestTree Source

A tree of tests. This allows you to group tests for convenient display; it also allows you to write computations that return entire groups of tests.

Constructors

TestTree 

Fields

label :: String
 
payload :: Node
 

Instances

data Node Source

Constructors

Group [TestTree]

A group of tests. Contains a list of TestTree, each of which might be a Test or another Group.

forall a . Testable a => Test a

A QuickCheck test to run.

data Article Source

A single property or tree to test.

Constructors

forall a . Testable a => Single a 
Multi TestTree 

data Meta Source

Metadata about a particular test or group.

Constructors

Meta 

Fields

modDesc :: ModDesc

Name of file providing this test or group.

linenum :: Int

Line number of the test or group.

qName :: String

The name of the test or group, such as prop_mytest or proptree_mytest.

Instances

data Qual Source

Description of a single property or tree to test from a file. Unlike Item, this does not contain the actual item; this is for use when parsing a test input module.

Constructors

QTree 
QProp 

Instances

data ModDesc Source

Description of a module.

Constructors

ModDesc 

Fields

modPath :: String

Path to the module

modName :: [String]

Each part of the hierarchical name

makeModDesc Source

Arguments

:: FilePath

Reading was started in this directory

-> [FilePath]

Directory stack

-> FilePath

Name of specific file

-> ModDesc 

Creates a ModDesc.

data Decree Source

Specifies a single item to test, along with metadata about that item.

Constructors

Decree 

Fields

meta :: Meta
 
item :: Article
 

data Summary Source

Summary of all QuickCheck results.

Constructors

Summary 

Fields

success :: !Int
 
gaveUp :: !Int
 
failure :: !Int
 
noExpectedFailure :: !Int
 

group Source

Arguments

:: String

Group name; a string with no trailing newline.

-> [TestTree] 
-> TestTree 

Create a new Group of tests.

test Source

Arguments

:: Testable a 
=> String

Test name; a string with no trailing newline.

-> a 
-> TestTree 

Create a new Test.