{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Test.Syd.Validity.GenValidity.Property
( genGeneratesValid
, genGeneratesInvalid
) where
import Data.GenValidity
import Test.QuickCheck
import Test.Syd.Validity.Property.Utils
genGeneratesValid ::
forall a. (Show a, Validity a)
=> Gen a
-> Property
genGeneratesValid :: Gen a -> Property
genGeneratesValid Gen a
gen = Gen a -> (a -> Expectation) -> Property
forall a prop.
(Show a, Testable prop) =>
Gen a -> (a -> prop) -> Property
forAll Gen a
gen a -> Expectation
forall a. (Show a, Validity a) => a -> Expectation
shouldBeValid
genGeneratesInvalid ::
forall a. (Show a, Validity a)
=> Gen a
-> Property
genGeneratesInvalid :: Gen a -> Property
genGeneratesInvalid Gen a
gen = Gen a -> (a -> Expectation) -> Property
forall a prop.
(Show a, Testable prop) =>
Gen a -> (a -> prop) -> Property
forAll Gen a
gen a -> Expectation
forall a. (Show a, Validity a) => a -> Expectation
shouldBeInvalid