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
Documentation
shrinkPreservesValidOnGenValid :: forall a. (Show a, GenValid a) => (a -> [a]) -> Property Source #
shrinkPreservesValidOnGenValid (:[])
shrinkPreservesInvalidOnGenInvalid :: forall a. (Show a, GenInvalid a) => (a -> [a]) -> Property Source #
shrinkPreservesInvalidOnGenInvalid (:[])
shrinkValidPreservesValid :: forall a. (Show a, GenValid a) => Gen a -> Property Source #
shrinkValidPreservesValid (pure 5)
shrinkInvalidPreservesInvalid :: forall a. (Show a, GenInvalid a) => Gen a -> Property Source #
shrinkInvalidPreservesInvalid (pure (1/0) :: Gen Double)
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 #