Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hashable properties
You will need TypeApplications
to use these.
Synopsis
- hashableSpecOnValid :: forall a. (Show a, Eq a, Typeable a, GenValid a, Hashable a) => Spec
- hashableSpecOnInvalid :: forall a. (Show a, Eq a, Typeable a, GenInvalid a, Hashable a) => Spec
- hashableSpec :: forall a. (Show a, Eq a, Typeable a, GenUnchecked a, Hashable a) => Spec
- hashableSpecOnArbitrary :: forall a. (Show a, Eq a, Typeable a, Arbitrary a, Hashable a) => Spec
- hashableSpecOnGen :: forall a. (Show a, Eq a, Typeable a, Hashable a) => Gen a -> String -> (a -> [a]) -> Spec
Documentation
hashableSpecOnValid :: forall a. (Show a, Eq a, Typeable a, GenValid a, Hashable a) => Spec Source #
Standard test spec for properties of Hashable instances for valid values
Example usage:
hashableSpecOnValid @Double
hashableSpecOnInvalid :: forall a. (Show a, Eq a, Typeable a, GenInvalid a, Hashable a) => Spec Source #
Standard test spec for properties of Hashable instances for invalid values
Example usage:
hashableSpecOnInvalid @Double
hashableSpec :: forall a. (Show a, Eq a, Typeable a, GenUnchecked a, Hashable a) => Spec Source #
Standard test spec for properties of Hashable instances for unchecked values
Example usage:
hashableSpec @Int
hashableSpecOnArbitrary :: forall a. (Show a, Eq a, Typeable a, Arbitrary a, Hashable a) => Spec Source #
Standard test spec for properties of Hashable instances for arbitrary values
Example usage:
hashableSpecOnArbitrary @Int
hashableSpecOnGen :: forall a. (Show a, Eq a, Typeable a, Hashable a) => Gen a -> String -> (a -> [a]) -> Spec Source #
Standard test spec for properties of Hashable instances for values generated by a given generator (and name for that generator).
Example usage:
hashableSpecOnGen ((* 2) <$> genValid @Int) "even"