Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Constrained.Test
Contents
Description
Useful properties for debugging HasSpec instances and this library itself
Synopsis
- prop_sound ∷ HasSpec a ⇒ Specification a → Property
- prop_constrained_satisfies_sound ∷ HasSpec a ⇒ Specification a → Property
- prop_constrained_explained ∷ HasSpec a ⇒ Specification a → Property
- prop_complete ∷ HasSpec a ⇒ Specification a → Property
- prop_constrained_satisfies_complete ∷ HasSpec a ⇒ Specification a → Property
- prop_shrink_sound ∷ HasSpec a ⇒ Specification a → Property
- prop_conformEmpty ∷ ∀ a. HasSpec a ⇒ a → Property
- prop_univSound ∷ TestableFn → Property
- main ∷ IO ()
- prop_gen_sound ∷ ∀ a. HasSpec a ⇒ Specification a → Property
- specType ∷ Specification a → String
- showCtxWith ∷ ∀ fn as b. AppRequires fn as b ⇒ fn as b → TestableCtx as → String
- data TestableFn where
- TestableFn ∷ (Arbitrary (Specification b), Typeable (FunTy as b), AppRequires t as b) ⇒ t as b → TestableFn
- prop_mapSpec ∷ (HasSpec a, AppRequires t '[a] b) ⇒ t '[a] b → Specification a → Property
- prop_propagateSpecSound ∷ (HasSpec a, AppRequires t '[a] b) ⇒ t '[a] b → b → Property
- data TestableCtx as where
- TestableCtx ∷ HasSpec a ⇒ ListCtx Value as (HOLE a) → TestableCtx as
- genTestableFn ∷ Gen TestableFn
Documentation
prop_sound ∷ HasSpec a ⇒ Specification a → Property Source #
prop_complete ∷ HasSpec a ⇒ Specification a → Property Source #
`prop_complete ps` assumes that ps
is satisfiable
prop_shrink_sound ∷ HasSpec a ⇒ Specification a → Property Source #
prop_conformEmpty ∷ ∀ a. HasSpec a ⇒ a → Property Source #
prop_gen_sound ∷ ∀ a. HasSpec a ⇒ Specification a → Property Source #
specType ∷ Specification a → String Source #
showCtxWith ∷ ∀ fn as b. AppRequires fn as b ⇒ fn as b → TestableCtx as → String Source #
data TestableFn where Source #
Constructors
TestableFn ∷ (Arbitrary (Specification b), Typeable (FunTy as b), AppRequires t as b) ⇒ t as b → TestableFn |
Instances
Arbitrary TestableFn Source # | |
Defined in Constrained.Test | |
Show TestableFn Source # | |
Defined in Constrained.Test Methods showsPrec ∷ Int → TestableFn → ShowS # show ∷ TestableFn → String # showList ∷ [TestableFn] → ShowS # |
prop_mapSpec ∷ (HasSpec a, AppRequires t '[a] b) ⇒ t '[a] b → Specification a → Property Source #
prop_propagateSpecSound ∷ (HasSpec a, AppRequires t '[a] b) ⇒ t '[a] b → b → Property Source #
data TestableCtx as where Source #
Constructors
TestableCtx ∷ HasSpec a ⇒ ListCtx Value as (HOLE a) → TestableCtx as |
Instances
(All HasSpec as, TypeList as) ⇒ Arbitrary (TestableCtx as) Source # | |
Defined in Constrained.Test |
Orphan instances
(HasSpec a, Arbitrary (TypeSpec a)) ⇒ Arbitrary (Specification a) Source # | |
Methods arbitrary ∷ Gen (Specification a) Source # shrink ∷ Specification a → [Specification a] Source # | |
(Ord a, Arbitrary (Specification a), Arbitrary a) ⇒ Arbitrary (SetSpec a) Source # | |
Arbitrary (FoldSpec (Map k v)) Source # | |
Arbitrary (FoldSpec (Set a)) Source # | |
(Arbitrary (Specification a), Foldy a) ⇒ Arbitrary (FoldSpec a) Source # | |
(Arbitrary a, Arbitrary (FoldSpec a), Arbitrary (TypeSpec a), HasSpec a) ⇒ Arbitrary (ListSpec a) Source # | |
(Arbitrary (Specification a), Arbitrary (Specification b)) ⇒ Arbitrary (SumSpec a b) Source # | |
(Arbitrary k, Arbitrary v, Arbitrary (TypeSpec k), Arbitrary (TypeSpec v), Ord k, HasSpec k, Foldy v) ⇒ Arbitrary (MapSpec k v) Source # | |
(Arbitrary (Specification a), Arbitrary (Specification b)) ⇒ Arbitrary (PairSpec a b) Source # | |