constrained
Safe HaskellSafe-Inferred
LanguageHaskell2010

Constrained.Test

Synopsis

Documentation

testAll ∷ IO () Source #

tests ∷ Bool → Spec Source #

testSpecFailHasSpec fn a ⇒ String → Specification fn a → Spec Source #

data NumberyType where Source #

Constructors

N ∷ (Typeable a, Numbery a) ⇒ Proxy a → NumberyType 

testNumberyListSpec ∷ String → (∀ a. Numbery a ⇒ Specification BaseFn [a]) → Spec Source #

testNumberyListSpecNoShrink ∷ String → (∀ a. Numbery a ⇒ Specification BaseFn [a]) → Spec Source #

testNumberyListSpec' ∷ Bool → String → (∀ a. Numbery a ⇒ Specification BaseFn [a]) → Spec Source #

testSpecHasSpec fn a ⇒ String → Specification fn a → Spec Source #

testSpecNoShrinkHasSpec fn a ⇒ String → Specification fn a → Spec Source #

testSpec'HasSpec fn a ⇒ Bool → String → Specification fn a → Spec Source #

noInfinityGen (NumSpec fn Integer) Source #

When we multiply intervals, we get a bounding box, around the possible values. When the intervals have infinities, the bounding box can be very loose. In fact the order in which we multiply intervals with infinities can affect how loose the bounding box is. So ((NegInf, n) * (a, b)) * (c,d) AND (NegInf, n) * ((a, b) * (c,d)) may have different bounding boxes To test the associative laws we must have no infinities, and then the associative law will hold.

plusNegateNumSpec fn Integer → NumSpec fn Integer → Property Source #

commutesNumSpecNumSpec fn Integer → NumSpec fn Integer → Property Source #

assocNumSpecNumSpec fn Integer → NumSpec fn Integer → NumSpec fn Integer → Property Source #

commuteTimesNumSpec fn Integer → NumSpec fn Integer → Property Source #

negNegateNumSpec fn Integer → Property Source #

scaleNumSpecNumSpec fn Integer → Property Source #

scaleOneNumSpec fn Integer → Property Source #

conformsToSpecETest ∷ ∀ a. HasSpec BaseFn a ⇒ a → Specification BaseFn a → Property Source #

The test succeeds if conformsToSpec and conformsToSpecE both conform, or both fail to conform. We collect answers by specType (ErrorSpec, MemberSpec, SuspendedSpec, ...) and whether they both conform, or they both fail to conform.