package core_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include Quickcheck_intf.S with type 'a gen := 'a Generator.t with type 'a obs := 'a Observer.t with type 'a shr := 'a Shrinker.t with type t := Base.Int.t
val gen : Base.Int.t Generator.t
val obs : Base.Int.t Observer.t
val shrinker : Base.Int.t Shrinker.t
val gen_incl : Base.Int.t -> Base.Int.t -> Base.Int.t Generator.t

gen_incl lower_bound upper_bound produces values between lower_bound and upper_bound, inclusive. It uses an ad hoc distribution that stresses boundary conditions more often than a uniform distribution, while still able to produce any value in the range. Raises if lower_bound > upper_bound.

val gen_uniform_incl : Base.Int.t -> Base.Int.t -> Base.Int.t Generator.t

gen_uniform_incl lower_bound upper_bound produces a generator for values uniformly distributed between lower_bound and upper_bound, inclusive. Raises if lower_bound > upper_bound.

val gen_log_uniform_incl : Base.Int.t -> Base.Int.t -> Base.Int.t Generator.t

gen_log_uniform_incl lower_bound upper_bound produces a generator for values between lower_bound and upper_bound, inclusive, where the number of bits used to represent the value is uniformly distributed. Raises if (lower_bound < 0) || (lower_bound > upper_bound).

val gen_log_incl : Base.Int.t -> Base.Int.t -> Base.Int.t Generator.t

gen_log_incl lower_bound upper_bound is like gen_log_uniform_incl, but weighted slightly more in favor of generating lower_bound and upper_bound specifically.

OCaml

Innovation. Community. Security.