QuickCheck-1.1.0.0: Automatic testing of Haskell programs

Portabilityportable
Stabilityexperimental
Maintainerlibraries@haskell.org

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

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) -> PropertySource

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

data Gen a Source

Instances

elements :: [a] -> Gen aSource

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 aSource

resize :: Int -> Gen a -> Gen aSource

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

oneof :: [Gen a] -> Gen aSource

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

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

class Arbitrary a whereSource

Methods

arbitrary :: Gen aSource

coarbitrary :: a -> Gen b -> Gen bSource

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

variant :: Int -> Gen a -> Gen aSource

class Testable a whereSource

Methods

property :: a -> PropertySource

data Result Source

Constructors

Result 

Fields

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

Instances

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