QuickCheck-1.2.0.1: Automatic testing of Haskell programs

Copyright(c) Koen Claessen, John Hughes 2001
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Test.QuickCheck

Description

QuickCheck v.0.2 DRAFT implementation; last update 000104. Koen Claessen, John Hughes. This file represents work in progress, and might change at a later date.

Documentation

quickCheck :: Testable a => a -> IO () Source

verboseCheck :: Testable a => a -> IO () Source

test :: Testable a => a -> IO () Source

data Config Source

Constructors

Config 

check :: Testable a => Config -> a -> IO () Source

forAll :: (Show a, Testable b) => Gen a -> (a -> b) -> Property Source

(==>) :: Testable a => Bool -> a -> Property infixr 0 Source

collect :: (Show a, Testable b) => a -> b -> Property Source

classify :: Testable a => Bool -> String -> a -> Property infix 1 Source

data Gen a Source

Instances

elements :: [a] -> Gen a Source

two :: Monad m => m a -> m (a, a) Source

three :: Monad m => m a -> m (a, a, a) Source

four :: Monad m => m a -> m (a, a, a, a) Source

sized :: (Int -> Gen a) -> Gen a Source

resize :: Int -> Gen a -> Gen a Source

choose :: Random a => (a, a) -> Gen a Source

oneof :: [Gen a] -> Gen a Source

frequency :: [(Int, Gen a)] -> Gen a Source

vector :: Arbitrary a => Int -> Gen [a] Source

promote :: (a -> Gen b) -> Gen (a -> b) Source

variant :: Int -> Gen a -> Gen a Source

class Testable a where Source

Methods

property :: a -> Property Source

data Result Source

Constructors

Result 

Fields

ok :: Maybe Bool
 
stamp :: [String]
 
arguments :: [String]
 

Instances

generate :: Int -> StdGen -> Gen a -> a Source