| QuickCheck-1.1.0.0: Automatic testing of Haskell programs | Contents | Index |
|
Test.QuickCheck | Portability | portable | Stability | experimental | Maintainer | libraries@haskell.org |
|
|
|
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 () |
|
verboseCheck :: Testable a => a -> IO () |
|
test :: Testable a => a -> IO () |
|
data Config |
Constructors | Config | | configMaxTest :: Int | | configMaxFail :: Int | | configSize :: (Int -> Int) | | configEvery :: (Int -> [String] -> String) | |
|
|
|
|
defaultConfig :: Config |
|
check :: Testable a => Config -> a -> IO () |
|
forAll :: (Show a, Testable b) => Gen a -> (a -> b) -> Property |
|
(==>) :: Testable a => Bool -> a -> Property |
|
label :: Testable a => String -> a -> Property |
|
collect :: (Show a, Testable b) => a -> b -> Property |
|
classify :: Testable a => Bool -> String -> a -> Property |
|
trivial :: Testable a => Bool -> a -> Property |
|
data Gen a |
Instances | |
|
|
elements :: [a] -> Gen a |
|
two :: Monad m => m a -> m (a, a) |
|
three :: Monad m => m a -> m (a, a, a) |
|
four :: Monad m => m a -> m (a, a, a, a) |
|
sized :: (Int -> Gen a) -> Gen a |
|
resize :: Int -> Gen a -> Gen a |
|
choose :: Random a => (a, a) -> Gen a |
|
oneof :: [Gen a] -> Gen a |
|
frequency :: [(Int, Gen a)] -> Gen a |
|
vector :: Arbitrary a => Int -> Gen [a] |
|
class Arbitrary a where |
| Methods | arbitrary :: Gen a | | coarbitrary :: a -> Gen b -> Gen b |
| | Instances | Arbitrary Bool | Arbitrary Double | Arbitrary Float | Arbitrary Int | Arbitrary Integer | Arbitrary () | (Arbitrary a, Arbitrary b) => Arbitrary (a, b) | (Arbitrary a, Arbitrary b, Arbitrary c) => Arbitrary (a, b, c) | (Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d) => Arbitrary (a, b, c, d) | (Arbitrary a, Arbitrary b) => Arbitrary (a -> b) | Arbitrary a => Arbitrary (Maybe a) | Arbitrary (Poly a) | Arbitrary a => Arbitrary [a] | (Arbitrary a, Arbitrary b) => Arbitrary (Either a b) |
|
|
|
rand :: Gen StdGen |
|
promote :: (a -> Gen b) -> Gen (a -> b) |
|
variant :: Int -> Gen a -> Gen a |
|
class Testable a where |
| Methods | | | Instances | |
|
|
data Property |
Instances | |
|
|
data Result |
Constructors | Result | | ok :: (Maybe Bool) | | stamp :: [String] | | arguments :: [String] | |
|
| Instances | |
|
|
generate :: Int -> StdGen -> Gen a -> a |
|
evaluate :: Testable a => a -> Gen Result |
|
Produced by Haddock version 0.8 |