Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- testAll ∷ IO ()
- tests ∷ Bool → Spec
- negativeTests ∷ Spec
- testSpecFail ∷ HasSpec fn a ⇒ String → Specification fn a → Spec
- numberyTests ∷ Spec
- sizeTests ∷ Spec
- data NumberyType where
- N ∷ (Typeable a, Numbery a) ⇒ Proxy a → NumberyType
- testNumberyListSpec ∷ String → (∀ a. Numbery a ⇒ Specification BaseFn [a]) → Spec
- testNumberyListSpecNoShrink ∷ String → (∀ a. Numbery a ⇒ Specification BaseFn [a]) → Spec
- testNumberyListSpec' ∷ Bool → String → (∀ a. Numbery a ⇒ Specification BaseFn [a]) → Spec
- testSpec ∷ HasSpec fn a ⇒ String → Specification fn a → Spec
- testSpecNoShrink ∷ HasSpec fn a ⇒ String → Specification fn a → Spec
- testSpec' ∷ HasSpec fn a ⇒ Bool → String → Specification fn a → Spec
- noInfinity ∷ Gen (NumSpec fn Integer)
- plusNegate ∷ NumSpec fn Integer → NumSpec fn Integer → Property
- commutesNumSpec ∷ NumSpec fn Integer → NumSpec fn Integer → Property
- assocNumSpec ∷ NumSpec fn Integer → NumSpec fn Integer → NumSpec fn Integer → Property
- commuteTimes ∷ NumSpec fn Integer → NumSpec fn Integer → Property
- assocNumSpecTimes ∷ Gen Property
- negNegate ∷ NumSpec fn Integer → Property
- scaleNumSpec ∷ NumSpec fn Integer → Property
- scaleOne ∷ NumSpec fn Integer → Property
- numNumSpecTree ∷ Spec
- hasSizeList ∷ Specification BaseFn [Int]
- hasSizeSet ∷ Specification BaseFn (Set Int)
- hasSizeMap ∷ Specification BaseFn (Map Int Int)
- prop_noNarrowLoop ∷ Int → Int → Specification BaseFn Int → Specification BaseFn Int → Property
- conformsToSpecETest ∷ ∀ a. HasSpec BaseFn a ⇒ a → Specification BaseFn a → Property
- conformsToSpecESpec ∷ Spec
Documentation
testSpecFail ∷ HasSpec fn a ⇒ String → Specification fn a → Spec Source #
data NumberyType where Source #
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 #
testSpecNoShrink ∷ HasSpec fn a ⇒ String → Specification fn a → Spec Source #
noInfinity ∷ Gen (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.
prop_noNarrowLoop ∷ Int → Int → Specification BaseFn Int → Specification BaseFn Int → 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.