QuickCheckVariant-0.2.0.0: Generator of "valid" and "invalid" data in a type class

Copyright(c) Jorge Santiago Alvarez Cuadros 2015
LicenseGPL-3
Maintainersanjorgek@ciencias.unam.mx
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Test.QuickCheck.Variant

Description

To get random "invalid" and "valid" data

Synopsis

Documentation

class Variant a where Source #

You can define

>>> instance (Varaint a) => Arbitrary a where {arbitrary = oneof [valid, invalid]}

Minimal complete definition

valid, invalid

Methods

valid :: Gen a Source #

Get a generator of valid random data type

invalid :: Gen a Source #

Get a generator of invalid random data type

class VarTesteable prop where Source #

The class of things wich can be tested with invalid or valid input.

Minimal complete definition

propertyValid, propertyInvalid

Methods

propertyValid :: prop -> Property Source #

Property for valid input

propertyInvalid :: prop -> Property Source #

Property for invalid input

Instances

VarTesteable Bool Source #

Same as Testeable

(Arbitrary a, Variant a, Show a, Testable prop) => VarTesteable (a -> prop) Source #

Instead of variant we use valid or invalid generators

Methods

propertyValid :: (a -> prop) -> Property Source #

propertyInvalid :: (a -> prop) -> Property Source #