Module Base_quickcheck.Test
Use the Test module to run randomized tests. Each randomized test needs a generator, a shrinker, and a property to test.
module type S = Base_quickcheck__.Test_intf.Smodule Config : sig ... endval default_config : Config.tDefaults to a deterministic seed,
shrink_countandtest_countof 10_000 each, and sizes ranging from 0 to 30.
val run : f:('a -> Base.unit Base.Or_error.t) -> ?config:Config.t -> ?examples:'a Base.list -> (module S with type t = 'a) -> Base.unit Base.Or_error.tTests the property
f, failing if it raises or returnsError _. Testsffirst with anyexamples, then with values from the given generator. Only random values count toward thetest_counttotal, not values fromexamples.
val run_exn : f:('a -> Base.unit) -> ?config:Config.t -> ?examples:'a Base.list -> (module S with type t = 'a) -> Base.unitLike
run, but raises on failure.
val with_sample : f:('a Base.Sequence.t -> Base.unit Base.Or_error.t) -> ?config:Config.t -> ?examples:'a Base.list -> 'a Generator.t -> Base.unit Base.Or_error.tCalls
fwith the sequence of values thatrunwould get in the same configuration.
val with_sample_exn : f:('a Base.Sequence.t -> Base.unit) -> ?config:Config.t -> ?examples:'a Base.list -> 'a Generator.t -> Base.unitLike
with_sample, but raises on failure.