Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Test.Syd.Validity.Hashable
Description
Hashable properties
You will need TypeApplications
to use these.
Documentation
hashableSpec :: 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:
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"