{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Test.Validity.GenValidity.Property
( genGeneratesValid
, genGeneratesInvalid
) where
import Data.GenValidity
import Test.Hspec
import Test.QuickCheck
genGeneratesValid ::
forall a. (Show a, Validity a)
=> Gen a
-> (a -> [a])
-> Property
genGeneratesValid gen s = forAllShrink gen s (`shouldSatisfy` isValid)
genGeneratesInvalid ::
forall a. (Show a, Validity a)
=> Gen a
-> (a -> [a])
-> Property
genGeneratesInvalid gen s = forAllShrink gen s (`shouldSatisfy` isInvalid)