hedgehog.core

Type members

Classlikes

sealed trait Cover

Whether a test is covered by a classifier, and therefore belongs to a Class

Whether a test is covered by a classifier, and therefore belongs to a Class

Companion
object
object Cover
Companion
class
case class CoverCount(toInt: Int)

The total number of tests which are covered by a classifier.

The total number of tests which are covered by a classifier.

Companion
object
object CoverCount
Companion
class
case class CoverPercentage(toDouble: Double)

The relative number of tests which are covered by a classifier.

The relative number of tests which are covered by a classifier.

Companion
object
Companion
class
case class Coverage[A](labels: Map[LabelName, Label[A]])
Companion
object
object Coverage
Companion
class
case class DiscardCount(value: Int)

The number of tests a property had to discard.

The number of tests a property had to discard.

case class Error(value: Exception) extends Log
case class Examples(examples: Map[LabelName, List[Log]])
Companion
object
object Examples
Companion
class
case class Failed(shrinks: ShrinkCount, log: List[Log]) extends Status
case class ForAll(name: Name, value: String) extends Log
case object GaveUp extends Status
abstract class GenImplicits1
abstract class GenImplicits2 extends GenImplicits1
case class GenT[A](run: (Size, Seed) => Tree[(Seed, Option[A])])

Generator for random values of A.

Generator for random values of A.

Companion
object
object GenT extends GenImplicits2
Companion
class
case class Info(value: String) extends Log
case class Journal(logs: List[Log], coverage: Coverage[Cover])

A record containing the details of a test run.

A record containing the details of a test run.

Companion
object
object Journal
Companion
class
case class Label[A](name: LabelName, minimum: CoverPercentage, annotation: A)

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.

Companion
object
object Label
Companion
class
case class LabelName(render: String)

The name of a classifier.

The name of a classifier.

Companion
object
object LabelName
Companion
class
sealed trait Log
Companion
object
object Log
Companion
class
trait MonadGenT[M[_]]
Companion
object
object MonadGenT
Companion
class
case class Name(value: String)
Companion
object
object Name
Companion
class
trait NumericPlus[A]
Companion
object
object NumericPlus
Companion
class
case object OK extends Status
case class PropertyConfig(testLimit: SuccessCount, discardLimit: DiscardCount, shrinkLimit: ShrinkLimit)
Companion
object
Companion
class
class PropertyR[A](val gen: PropertyT[A], val test: A => Result)

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 A needs to be exposed/declared, and it's likely to be some horrible multi-value tuple.

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 A needs to be exposed/declared, and it's likely to be some horrible multi-value tuple.

Companion
object
object PropertyR
Companion
class
case class PropertyT[A](run: GenT[(Journal, Option[A])])
Companion
object
object PropertyT
Companion
class
case class Report(tests: SuccessCount, discards: DiscardCount, coverage: Coverage[CoverCount], examples: Examples, status: Status)
sealed trait Result
Companion
object
object Result
Companion
class
case class Seed(seed: MersenneTwister64)
Companion
object
object Seed
Companion
class
object Shrink extends XCompat
case class ShrinkCount(value: Int)

The numbers of times a property was able to shrink after a failing test.

The numbers of times a property was able to shrink after a failing test.

case class ShrinkLimit(value: Int)

The number of shrinks to try before giving up on shrinking.

The number of shrinks to try before giving up on shrinking.

sealed trait Status

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.

Companion
object
object Status
Companion
class
case class SuccessCount(value: Int)

The number of tests a property ran successfully.

The number of tests a property ran successfully.

Companion
object
object SuccessCount
Companion
class
case class Tree[A](value: A, children: Identity[LazyList[Tree[A]]])

NOTE: This differs from the Haskell version by not having an effect on the Node for performance reasons. See haskell-difference.md for more information.

NOTE: This differs from the Haskell version by not having an effect on the Node for performance reasons. See haskell-difference.md for more information.

FIXME The LazyList here 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

Companion
object
object Tree extends TreeImplicits2
Companion
class
abstract class TreeImplicits1
abstract class TreeImplicits2 extends TreeImplicits1
trait XCompat