package core
- Alphabetic
- Public
- Protected
Type Members
- sealed trait Cover extends AnyRef
Whether a test is covered by a classifier, and therefore belongs to a
Class - case class CoverCount(toInt: Int) extends Product with Serializable
The total number of tests which are covered by a classifier.
- case class CoverPercentage(toDouble: Double) extends Product with Serializable
The relative number of tests which are covered by a classifier.
- case class Coverage[A](labels: Map[LabelName, Label[A]]) extends Product with Serializable
- case class DiscardCount(value: Int) extends Product with Serializable
The number of tests a property had to discard.
- case class Error(value: Exception) extends Log with Product with Serializable
- case class Examples(examples: Map[LabelName, List[Log]]) extends Product with Serializable
- case class Failed(shrinks: ShrinkCount, log: List[Log]) extends Status with Product with Serializable
- case class ForAll(name: Name, value: String) extends Log with Product with Serializable
- abstract class GenImplicits1 extends AnyRef
- abstract class GenImplicits2 extends GenImplicits1
- case class GenT[A](run: (Size, Seed) => Tree[(Seed, Option[A])]) extends Product with Serializable
Generator for random values of
A. - case class Info(value: String) extends Log with Product with Serializable
- case class Journal(logs: List[Log], coverage: Coverage[Cover]) extends Product with Serializable
A record containing the details of a test run.
- case class Label[A](name: LabelName, minimum: CoverPercentage, annotation: A) extends Product with Serializable
The extent to which a test is covered by a classifier.
The extent to which a test is covered by a classifier.
_When a classifier's coverage does not exceed the required minimum, the test will be failed._
- case class LabelName(render: String) extends Product with Serializable
The name of a classifier.
- sealed trait Log extends AnyRef
- trait MonadGenT[M[_]] extends AnyRef
- case class Name(value: String) extends Product with Serializable
- trait NumericPlus[A] extends AnyRef
- case class PropertyConfig(testLimit: SuccessCount, discardLimit: DiscardCount, shrinkLimit: ShrinkLimit) extends Product with Serializable
- class PropertyR[A] extends AnyRef
A slightly different way to express a property, with the added benefit of exposing a pure "test".
A slightly different way to express a property, with the added benefit of exposing a pure "test". This enables running the test with specific examples, either as a "golden" test or from the shell. Or both. The trade-off is that the
Aneeds to be exposed/declared, and it's likely to be some horrible multi-value tuple. - case class PropertyT[A](run: GenT[(Journal, Option[A])]) extends Product with Serializable
- trait PropertyTReporting extends AnyRef
- case class Report(tests: SuccessCount, discards: DiscardCount, coverage: Coverage[CoverCount], examples: Examples, status: Status) extends Product with Serializable
- sealed trait Result extends AnyRef
- case class Seed(seed: MersenneTwister64) extends Product with Serializable
- case class ShrinkCount(value: Int) extends Product with Serializable
The numbers of times a property was able to shrink after a failing test.
- case class ShrinkLimit(value: Int) extends Product with Serializable
The number of shrinks to try before giving up on shrinking.
- final class SourceLocation extends Log
The location in the source file of the assertion which failed.
The location in the source file of the assertion which failed.
Equality deliberately ignores the
SourcePosit carries, so any twoSourceLocationvalues are equal. A location is provenance for a failure rather than part of the logical outcome, and making it significant would mean that two otherwise identicalResults written on different lines compared unequal. - final case class SourcePos(relativePath: String, fileName: String, line: Int) extends Product with Serializable
The location in the source file at which an assertion was written.
The location in the source file at which an assertion was written.
An instance is materialised by the compiler at the point where it is required, so a
Resultconstructor which takes one implicitly reports the caller's location rather than a location inside Hedgehog itself.No absolute path is stored. An absolute path is baked into the compiled class file as a string constant, so the same source compiled from two checkout directories produces two different class files. That defeats a shared build cache, which would otherwise hand one machine another machine's paths on a legitimate cache hit, and it defeats distributed test execution and reproducible builds. It also leaks the publisher's filesystem into a published artefact.
- relativePath
the path of the source file with the compiler's working directory stripped, which under sbt is the build root, and the path exactly as captured when it does not sit underneath that directory
- fileName
the simple name of the source file
- line
the 1-based line number
- sealed trait Status extends AnyRef
The status of a property test run.
The status of a property test run.
In the case of a failure it provides the seed used for the test, the number of shrinks, and the execution log.
- case class SuccessCount(value: Int) extends Product with Serializable
The number of tests a property ran successfully.
- case class Tree[A](value: A, children: Identity[LazyList[Tree[A]]]) extends Product with Serializable
NOTE: This differs from the Haskell version by not having an effect on the
Nodefor performance reasons.NOTE: This differs from the Haskell version by not having an effect on the
Nodefor performance reasons. Seehaskell-difference.mdfor more information.FIXME The
LazyListhere is critical to avoid running extra tests during shrinking. The alternative might be something like: https://github.com/hedgehogqa/scala-hedgehog/compare/topic/issue-66-lazy-shrinking - abstract class TreeImplicits1 extends AnyRef
- abstract class TreeImplicits2 extends TreeImplicits1
- trait XCompat extends AnyRef
Value Members
- object Cover
- object CoverCount extends Serializable
- object CoverPercentage extends Serializable
- object Coverage extends Serializable
- object Examples extends Serializable
- case object GaveUp extends Status with Product with Serializable
- object GenT extends GenImplicits2 with Serializable
- object Journal extends Serializable
- object Label extends Serializable
- object LabelName extends Serializable
- object Log
- object MonadGenT
- object Name extends Serializable
- object NumericPlus
- case object OK extends Status with Product with Serializable
- object PropertyConfig extends Serializable
- object PropertyR
- object PropertyT extends Serializable
- object Result
- object Seed extends Serializable
- object Shrink extends XCompat
- object SourceLocation
- object SourcePos extends Serializable
- object SourcePosMacro
- object Status
- object SuccessCount extends Serializable
- object Tree extends TreeImplicits2 with Serializable