Module type Quickcheck.S_int
include Core_kernel.Quickcheck_intf.S_range
include Core_kernel.Quickcheck_intf.S
val quickcheck_generator : t Base_quickcheck.Generator.t
val quickcheck_observer : t Base_quickcheck.Observer.t
val quickcheck_shrinker : t Base_quickcheck.Shrinker.t
val gen_incl : t -> t -> t Base_quickcheck.Generator.t
gen_incl lower_bound upper_bound
produces values betweenlower_bound
andupper_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 iflower_bound > upper_bound
.
val gen_uniform_incl : t -> t -> t Base_quickcheck.Generator.t
gen_uniform_incl lower_bound upper_bound
produces a generator for values uniformly distributed betweenlower_bound
andupper_bound
, inclusive. Raises iflower_bound > upper_bound
.
val gen_log_uniform_incl : t -> t -> t Base_quickcheck.Generator.t
gen_log_uniform_incl lower_bound upper_bound
produces a generator for values betweenlower_bound
andupper_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 : t -> t -> t Base_quickcheck.Generator.t
gen_log_incl lower_bound upper_bound
is likegen_log_uniform_incl
, but weighted slightly more in favor of generatinglower_bound
andupper_bound
specifically.