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