genvalidity-hspec-hashable-0.1.0.0: Standard spec's for Hashable instances

Safe HaskellNone
LanguageHaskell2010

Test.Validity.Hashable

Description

Hashable properties

You will need TypeApplications to use these.

Synopsis

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"