Copyright | (c) Jorge Santiago Alvarez Cuadros, 2015 |
---|---|
License | GPL-3 |
Maintainer | sanjorgek@ciencias.unam.mx |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
To get random "invalid" and "valid" data
- class Variant a where
- class VarTesteable prop where
Documentation
class Variant a where Source #
You can define
>>>
instance (Varaint a) => Arbitrary a where {arbitrary = oneof [valid, invalid]}
Get a generator of valid random data type
Get a generator of invalid random data type
Variant a => Variant [a] Source # | Variant of a list. A valid list only had valid data. A invalid list had only invalid data or some valid data with invalid data. |
Variant a => Variant (Maybe a) Source # | Variant Maybe Only Just data can be invalid, nothing always is valid. |
(Variant a, Variant b) => Variant (Either a b) Source # | Varaint Either. |
(Variant a, Variant b) => Variant (a, b) Source # | Varaint tuple Invalid tuple may had some valid data with invalid data or only invalid data. Valid tuple had only valid data. |
(Variant a, Variant b, Variant c) => Variant (a, b, c) Source # | Varaint 3-tuple Invalid 3-tuple may had some valid data with invalid data or only invalid data. Valid 3-tuple had only valid data. |
class VarTesteable prop where Source #
The class of things wich can be tested with invalid or valid input.
propertyValid :: prop -> Property Source #
Property for valid input
propertyInvalid :: prop -> Property Source #
Property for invalid input