Safe Haskell | None |
---|---|
Language | Haskell98 |
- props :: PropList
- class PropertyList l where
- propertyList :: Desc -> l -> Property (PropertyListType l)
- combineProperties :: Desc -> l -> Property (PropertyListType l)
- type family PropertyListType t
- data PropList = PropList [Property HasInfo]
Documentation
Starts accumulating a list of properties.
propertyList "foo" $ props & someproperty ! oldproperty & otherproperty
class PropertyList l where Source
propertyList :: Desc -> l -> Property (PropertyListType l) Source
Combines a list of properties, resulting in a single property that when run will run each property in the list in turn, and print out the description of each as it's run. Does not stop on failure; does propagate overall success/failure.
Note that Property HasInfo and Property NoInfo are not the same
type, and so cannot be mixed in a list. To make a list of
mixed types, which can also include RevertableProperty,
use props
combineProperties :: Desc -> l -> Property (PropertyListType l) Source
Combines a list of properties, resulting in one property that ensures each in turn. Stops if a property fails.
type family PropertyListType t Source
Type level function to calculate whether a PropertyList has Info.
type PropertyListType PropList = HasInfo Source | |
type PropertyListType [RevertableProperty NoInfo] = NoInfo Source | |
type PropertyListType [RevertableProperty HasInfo] = HasInfo Source | |
type PropertyListType [Property NoInfo] = NoInfo Source | |
type PropertyListType [Property HasInfo] = HasInfo Source |