Safe Haskell | None |
---|---|
Language | Haskell2010 |
Tests for shrinking functions
Synopsis
- shrinkPreservesValidOnGenValid :: forall a. (Show a, GenValid a) => (a -> [a]) -> Property
- shrinkPreservesInvalidOnGenInvalid :: forall a. (Show a, GenInvalid a) => (a -> [a]) -> Property
- shrinkValidPreservesValid :: forall a. (Show a, GenValid a) => Gen a -> Property
- shrinkInvalidPreservesInvalid :: forall a. (Show a, GenInvalid a) => Gen a -> Property
- shrinkingStaysValid :: forall a. (Show a, Validity a) => Gen a -> (a -> [a]) -> Property
- shrinkingStaysValidWithLimit :: forall a. (Show a, Validity a) => Gen a -> (a -> [a]) -> Int -> Property
- shrinkingStaysInvalid :: forall a. (Show a, Validity a) => Gen a -> (a -> [a]) -> Property
- shrinkingPreserves :: forall a. Show a => Gen a -> (a -> [a]) -> (a -> Bool) -> Property
- shrinkingPreservesWithLimit :: forall a. Show a => Gen a -> (a -> [a]) -> Int -> (a -> Bool) -> Property
- shrinkDoesNotShrinkToItself :: forall a. (Show a, Eq a, GenUnchecked a) => (a -> [a]) -> Property
- shrinkDoesNotShrinkToItselfWithLimit :: forall a. (Show a, Eq a, GenUnchecked a) => (a -> [a]) -> Int -> Property
- shrinkDoesNotShrinkToItselfOnValid :: forall a. (Show a, Eq a, GenValid a) => (a -> [a]) -> Property
- shrinkDoesNotShrinkToItselfOnValidWithLimit :: forall a. (Show a, Eq a, GenValid a) => (a -> [a]) -> Int -> Property
- shrinkDoesNotShrinkToItselfOnInvalid :: forall a. (Show a, Eq a, GenInvalid a) => (a -> [a]) -> Property
- shrinkDoesNotShrinkToItselfOnInvalidWithLimit :: forall a. (Show a, Eq a, GenInvalid a) => (a -> [a]) -> Int -> Property
- doesNotShrinkToItself :: forall a. (Show a, Eq a) => Gen a -> (a -> [a]) -> Property
- doesNotShrinkToItselfWithLimit :: forall a. (Show a, Eq a) => Gen a -> (a -> [a]) -> Int -> Property
Documentation
shrinkPreservesValidOnGenValid :: forall a. (Show a, GenValid a) => (a -> [a]) -> Property Source #
shrinkPreservesValidOnGenValid ((:[]) :: Int -> [Int])
shrinkPreservesInvalidOnGenInvalid :: forall a. (Show a, GenInvalid a) => (a -> [a]) -> Property Source #
shrinkPreservesInvalidOnGenInvalid ((:[]) :: Rational -> [Rational])
shrinkValidPreservesValid :: forall a. (Show a, GenValid a) => Gen a -> Property Source #
shrinkValidPreservesValid (pure 5 :: Gen Rational)
shrinkInvalidPreservesInvalid :: forall a. (Show a, GenInvalid a) => Gen a -> Property Source #
shrinkingStaysValid :: forall a. (Show a, Validity a) => Gen a -> (a -> [a]) -> Property Source #
shrinkingStaysValid (pure 5 :: Gen Double) (\d -> [d - 1, d - 2])
shrinkingStaysValidWithLimit :: forall a. (Show a, Validity a) => Gen a -> (a -> [a]) -> Int -> Property Source #
shrinkingStaysValidWithLimit (pure 5 :: Gen Double) (\d -> [d - 1, read "NaN"]) 1
shrinkingStaysInvalid :: forall a. (Show a, Validity a) => Gen a -> (a -> [a]) -> Property Source #
shrinkingStaysInvalid (pure (1/0) :: Gen Double) (:[])
shrinkingPreserves :: forall a. Show a => Gen a -> (a -> [a]) -> (a -> Bool) -> Property Source #
shrinkingPreserves (pure 5 :: Gen Int) (:[]) (== 5)
shrinkingPreservesWithLimit :: forall a. Show a => Gen a -> (a -> [a]) -> Int -> (a -> Bool) -> Property Source #
shrinkingPreservesWithLimit (pure 4) (:[]) 100 (== 4)
shrinkDoesNotShrinkToItself :: forall a. (Show a, Eq a, GenUnchecked a) => (a -> [a]) -> Property Source #
shrinkDoesNotShrinkToItself (shrinkUnchecked :: Double -> [Double])
shrinkDoesNotShrinkToItselfWithLimit :: forall a. (Show a, Eq a, GenUnchecked a) => (a -> [a]) -> Int -> Property Source #
shrinkDoesNotShrinkToItselfWithLimit (shrinkUnchecked :: Double -> [Double]) 100
shrinkDoesNotShrinkToItselfOnValid :: forall a. (Show a, Eq a, GenValid a) => (a -> [a]) -> Property Source #
shrinkDoesNotShrinkToItselfOnValid (shrinkValid :: Rational -> [Rational])
shrinkDoesNotShrinkToItselfOnValidWithLimit :: forall a. (Show a, Eq a, GenValid a) => (a -> [a]) -> Int -> Property Source #
shrinkDoesNotShrinkToItselfOnValidWithLimit (shrinkValid :: Rational -> [Rational]) 100
shrinkDoesNotShrinkToItselfOnInvalid :: forall a. (Show a, Eq a, GenInvalid a) => (a -> [a]) -> Property Source #
shrinkDoesNotShrinkToItselfOnInvalid (shrinkInvalid :: Rational -> [Rational])
shrinkDoesNotShrinkToItselfOnInvalidWithLimit :: forall a. (Show a, Eq a, GenInvalid a) => (a -> [a]) -> Int -> Property Source #
shrinkDoesNotShrinkToItselfOnInvalidWithLimit (shrinkInvalid :: Rational -> [Rational]) 100