Safe Haskell | Unsafe |
---|---|
Language | Haskell2010 |
Test.Expr.Property
Description
Property generation. Allows to generate property which compares two implementations of the same functionality.
(c) 2018–2021 Vladimír Štill
Synopsis
- prop :: Prop -> Q Exp
- data Prop = Prop {
- comparer :: Exp
- pattern :: Maybe Pat
- typeOrder :: TypeOrder
- teacherName :: Teacher Name
- studentName :: Student Name
- degenType :: Maybe Type
- compareTypes :: TypeOrder -> Teacher Type -> Student Type -> Q Exp
Documentation
$(prop 'cmp 'a 'b) :: Property >>> quickCheck $(prop '(===) 'drop 'drop) +++ OK, passed 100 tests.
>>>
quickCheck $(prop '(===) 'drop 'take)
*** Failed! Falsifiable (after 3 tests): 0 [()] [()] /= []
Constructors
Prop | |
Fields
|
compareTypes :: TypeOrder -> Teacher Type -> Student Type -> Q Exp #