package core_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Quickcheck is a library that uses predicate-based tests and pseudo-random inputs to automate testing.

For examples see lib/core/example/quickcheck.

An 'a t a generates values of type 'a with a specific probability distribution.

An 'a Quickcheck.Observer.t represents a hash function on 'a. Observers are used to construct distributions of random functions; see Quickcheck.Generator.fn.

A 'a Quickcheck.Shrinker.t takes a value of type 'a and produces similar values that are smaller by some metric.

module type S = Quickcheck_intf.S
module type S1 = Quickcheck_intf.S1
module type S2 = Quickcheck_intf.S2
type seed = [
  1. | `Deterministic of Base.String.t
  2. | `Nondeterministic
]

seed specifies how to initialize a pseudo-random number generator. When multiple tests share a deterministic seed, they each get a separate copy of the random generator's state; random choices in one test do not affect those in another. The nondeterministic seed causes a fresh random state to be generated nondeterministically for each test.

type shrink_attempts = [
  1. | `Exhaustive
  2. | `Limit of Base.Int.t
]
OCaml

Innovation. Community. Security.