| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Evaluation.Builtins.Integer.Conformance
Description
Assertions and specifications shared by normal integer properties and conformance generators.
Synopsis
- data Check
- data PropertyReport = PropertyReport {}
- data PropertySpec gen = PropertySpec {}
- generatePropertySpecs ∷ OutputFormat → CheckMode → PropertyFilter → FilePath → Int → QCGen → [String] → [PropertySpec (Gen Check)] → IO [PropertyReport]
- propertySpec ∷ GenerateCases prop ⇒ String → TestName → prop → PropertySpec (Gen Check)
- propertySpecPropertyIds ∷ [String] → [PropertySpec gen] → [PropertyId]
- testPropertySpecs ∷ (Property → Property) → [PropertySpec (Gen Check)] → [TestTree]
Documentation
A property check expressed without performing it. Normal QuickCheck suites
interpret it as an assertion, the Hedgehog suites have their own interpreter,
and the test generator extracts its terms, first checking with checkHolds that
the reference implementation satisfies the property for the sampled input.
Constructors
| CheckEq PlcTerm PlcTerm | Both terms evaluate successfully to equal results. |
| CheckEvaluatesTo PlcTerm TypeErrorOrCekResult | The term evaluates to the given result. |
| CheckTrue PlcTerm | The term evaluates successfully to |
| CheckOk PlcTerm | The term evaluates successfully. |
| CheckFails PlcTerm | The term fails to evaluate. |
| CheckBoth Check Check | Both checks must hold. When generating, each check contributes its own numbered cases, so one sampled input can use several numbers. |
| CheckImplies Bool Check | |
| CheckDistinct [PlcTerm] | All terms evaluate successfully to pairwise distinct results. |
| CheckSatisfies String PlcTerm (TypeErrorOrCekResult → Bool) | The term's result satisfies the predicate, labelled for failure reports. |
data PropertyReport Source #
A property together with the cases written for it.
Constructors
| PropertyReport | |
Instances
| Show PropertyReport Source # | |
Defined in Evaluation.Builtins.Conformance | |
| Eq PropertyReport Source # | |
Defined in Evaluation.Builtins.Conformance Methods (==) ∷ PropertyReport → PropertyReport → Bool Source # (/=) ∷ PropertyReport → PropertyReport → Bool Source # | |
data PropertySpec gen Source #
A property with the identifier and description shared by the normal test suite and the conformance generator, together with the sampler that produces its inputs.
Constructors
| PropertySpec | |
Fields
| |
generatePropertySpecs ∷ OutputFormat → CheckMode → PropertyFilter → FilePath → Int → QCGen → [String] → [PropertySpec (Gen Check)] → IO [PropertyReport] Source #
Generate the requested number of cases for every selected property, writing them below the suite directory.
propertySpec ∷ GenerateCases prop ⇒ String → TestName → prop → PropertySpec (Gen Check) Source #
A property described once and used by both the test suite and the conformance test generator. The identifier is the stable test case name; the description is what the test runner displays.
propertySpecPropertyIds ∷ [String] → [PropertySpec gen] → [PropertyId] Source #
Generated test case identifiers for a suite's properties, in declaration order.
testPropertySpecs ∷ (Property → Property) → [PropertySpec (Gen Check)] → [TestTree] Source #
Tasty tests for a group of properties, applying a limit to each.