Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- assertProps :: GroupName -> TestLimit -> Gen a -> (Gen a -> [(PropertyName, Property)]) -> IO Bool
- assertPropsSeq :: GroupName -> TestLimit -> Gen a -> (Gen a -> [(PropertyName, Property)]) -> IO Bool
- unary :: Show a => Gen a -> (a -> Bool) -> Property
- binary :: Show a => Gen a -> (a -> a -> Bool) -> Property
- ternary :: Show a => Gen a -> (a -> a -> a -> Bool) -> Property
- isIdempotent :: (Eq a, Show a) => (a -> a -> a) -> Gen a -> Property
- isCommutative :: (Eq a, Show a) => (a -> a -> a) -> Gen a -> Property
- isUnital :: (Eq a, Show a) => a -> (a -> a -> a) -> Gen a -> Property
- isAssociative :: (Eq a, Show a) => (a -> a -> a) -> Gen a -> Property
- isAdditive :: (Eq a, Show a, Additive a) => Gen a -> [(PropertyName, Property)]
- isGroup :: (Eq a, Show a) => a -> (a -> a -> a) -> (a -> a -> a) -> (a -> a) -> Gen a -> Property
- isSubtractive :: (Eq a, Show a, Subtractive a) => Gen a -> [(PropertyName, Property)]
- isMultiplicative :: (Eq a, Show a, Multiplicative a) => Gen a -> [(PropertyName, Property)]
- isDivisive :: (Eq a, Show a, Divisive a) => Gen a -> [(PropertyName, Property)]
- isDistributive :: (Eq a, Show a) => a -> (a -> a -> a) -> (a -> a -> a) -> Gen a -> Property
- isAbsorbativeUnit :: (Eq a, Show a) => a -> (a -> a -> a) -> Gen a -> Property
- isAbsorbative :: (Eq a, Show a) => (a -> a -> a) -> (a -> a -> a) -> Gen a -> Property
- isIntegral :: (Eq a, Show a, Integral a) => Gen a -> Property
- isFromIntegral :: (Eq a, Show a, FromInteger a, ToInteger a) => Gen a -> Property
- isRational :: (Eq a, Show a, FromRatio a, ToRatio a) => Gen a -> Property
- isSigned :: (Eq a, Show a, Signed a) => Gen a -> Property
- isNormed :: forall a b. (JoinSemiLattice b, Show a, Normed a b) => [b] -> Gen a -> Property
- isNormedBounded :: forall a. (JoinSemiLattice a, Bounded a, Show a, Normed a a) => Gen a -> Property
- isNormedUnbounded :: forall a. (JoinSemiLattice a, Show a, Normed a a) => Gen a -> Property
- isMetricBounded :: forall a. (JoinSemiLattice a, Bounded a, Additive a, Show a, Metric a a) => Gen a -> Property
- isMetricUnbounded :: forall a. (JoinSemiLattice a, Additive a, Show a, Metric a a) => Gen a -> Property
- isUpperBoundedField :: forall a. (Eq a, UpperBoundedField a, Show a) => Gen a -> Property
- isLowerBoundedField :: forall a. (Eq a, LowerBoundedField a, Show a) => Gen a -> Property
- isQuotientIntegerField :: forall a. (JoinSemiLattice a, FromInteger a, QuotientField a Integer, Show a) => Gen a -> Property
- isExpField :: forall a. (Ord a, Epsilon a, ExpField a, Show a, Normed a a) => Gen a -> Property
- isSemiring :: (Eq a, Show a, Distributive a) => Gen a -> [(PropertyName, Property)]
- isRing :: (Eq a, Show a, Distributive a, Subtractive a) => Gen a -> [(PropertyName, Property)]
- isStarSemiring :: (Eq a, Show a, StarSemiring a) => Gen a -> Property
- isInvolutive :: forall a. (Eq a, Show a, InvolutiveRing a) => Gen a -> Property
Documentation
assertProps :: GroupName -> TestLimit -> Gen a -> (Gen a -> [(PropertyName, Property)]) -> IO Bool Source #
running tests in parallel
assertPropsSeq :: GroupName -> TestLimit -> Gen a -> (Gen a -> [(PropertyName, Property)]) -> IO Bool Source #
run tests sequentially
Combinators
unary :: Show a => Gen a -> (a -> Bool) -> Property Source #
Combinator for a property of involving a single element
binary :: Show a => Gen a -> (a -> a -> Bool) -> Property Source #
Combinator for a property involving two elements
ternary :: Show a => Gen a -> (a -> a -> a -> Bool) -> Property Source #
Combinator for a property involving three elements
isAdditive :: (Eq a, Show a, Additive a) => Gen a -> [(PropertyName, Property)] Source #
isGroup :: (Eq a, Show a) => a -> (a -> a -> a) -> (a -> a -> a) -> (a -> a) -> Gen a -> Property Source #
isSubtractive :: (Eq a, Show a, Subtractive a) => Gen a -> [(PropertyName, Property)] Source #
isMultiplicative :: (Eq a, Show a, Multiplicative a) => Gen a -> [(PropertyName, Property)] Source #
isDivisive :: (Eq a, Show a, Divisive a) => Gen a -> [(PropertyName, Property)] Source #
isDistributive :: (Eq a, Show a) => a -> (a -> a -> a) -> (a -> a -> a) -> Gen a -> Property Source #
isFromIntegral :: (Eq a, Show a, FromInteger a, ToInteger a) => Gen a -> Property Source #
isNormed :: forall a b. (JoinSemiLattice b, Show a, Normed a b) => [b] -> Gen a -> Property Source #
isNormedBounded :: forall a. (JoinSemiLattice a, Bounded a, Show a, Normed a a) => Gen a -> Property Source #
isNormedUnbounded :: forall a. (JoinSemiLattice a, Show a, Normed a a) => Gen a -> Property Source #
isMetricBounded :: forall a. (JoinSemiLattice a, Bounded a, Additive a, Show a, Metric a a) => Gen a -> Property Source #
isMetricUnbounded :: forall a. (JoinSemiLattice a, Additive a, Show a, Metric a a) => Gen a -> Property Source #
isUpperBoundedField :: forall a. (Eq a, UpperBoundedField a, Show a) => Gen a -> Property Source #
isLowerBoundedField :: forall a. (Eq a, LowerBoundedField a, Show a) => Gen a -> Property Source #
isQuotientIntegerField :: forall a. (JoinSemiLattice a, FromInteger a, QuotientField a Integer, Show a) => Gen a -> Property Source #
isExpField :: forall a. (Ord a, Epsilon a, ExpField a, Show a, Normed a a) => Gen a -> Property Source #
isSemiring :: (Eq a, Show a, Distributive a) => Gen a -> [(PropertyName, Property)] Source #
isRing :: (Eq a, Show a, Distributive a, Subtractive a) => Gen a -> [(PropertyName, Property)] Source #
isStarSemiring :: (Eq a, Show a, StarSemiring a) => Gen a -> Property Source #
isInvolutive :: forall a. (Eq a, Show a, InvolutiveRing a) => Gen a -> Property Source #