Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file hegel.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130(** The current version of Hegel for OCaml. *)letversion="0.25.0"(** Generators for composable test data generation. *)moduleGenerators=Generators(** Stateful property-based testing on top of {!Generators}. *)moduleStateful=Stateful(** Concurrency capabilities for concurrent stateful tests. *)moduleConcurrency=ConcurrencymoduleSettings=Settings(** Auxiliary submodule for [@@deriving hegel_generator]. Included
below so [open Hegel] alone makes derived code resolve. *)moduleDerive=DeriveincludeDerive(** Test runner and run-loop internals; re-exported (doc-hidden) for white-box
tests, not for direct use. *)moduleInternal=InternalmoduletypeIo=Io.SmoduleMake=Io.Maketype('a,'p)generator=('a,'p)Generators.generatortypeprintable=Generators.printabletypeunprintable=Generators.unprintableincludeGenerators.Public(* Test-case and test-location types re-exported so the whole
public API lives directly under Hegel. The module re-exports above are
doc-hidden in the mli: white-box surfaces for the test suite. *)typetest_case=Internal.test_casetypetest_location=Internal.test_location={function_name:string;file:string;begin_line:int}exceptionAssume_rejected=Internal.Assume_rejectedexceptionUsage_error=Internal.Usage_error(** {2 Convenience re-exports} *)(** [run_hegel_test ?settings ?test_location ?database_key ?failure_blobs test_fn]
runs a property test against the native engine, defaulting to
[Settings.default ()]. The [let%hegel_test] PPX runs tests through the
equivalent {!run_hegel_test_ppx}. *)letrun_hegel_test?settings?test_location?database_key?failure_blobstest_fn=Internal.run_hegel_test?settings?test_location?database_key?failure_blobstest_fn;;(** [run_hegel_test_ppx] is {!run_hegel_test} with the PPX replay hint enabled;
the [let%hegel_test] PPX targets it. Not for direct use. *)letrun_hegel_test_ppx?settings?test_location?database_key?failure_blobstest_fn=Internal.run_hegel_test?settings?test_location~from_ppx:true?database_key?failure_blobstest_fn;;(** [assume tc condition] rejects the current test case if [condition] is
[false]. *)letassume=Internal.assume(** [note tc message] prints [message] to stderr subject to the run's verbosity:
never under [Quiet], only on the final (failing) replay under [Normal], and
on every test case under [Verbose] or [Debug]. *)letnote=Internal.note(** [require tc ?msg condition] fails the current test case when [condition] is
[false]. See {!Internal.require}. *)letrequire=Internal.require(** [require_equal tc ?msg sexp_of lhs rhs] fails the current test case when the
two values render to different sexps, printing a sexp diff in the failure
report. See {!Internal.require_equal}. *)letrequire_equal=Internal.require_equal(** [target tc ~label ~value] sends a target command to guide the search engine
toward higher values. *)lettarget=Internal.target(** [event tc ~label] records [label] as observed on this test case for the
end-of-run statistics report. *)letevent=Internal.event(** [event_value tc ~label ~value] records the finite observation [value] under
[label] for the end-of-run statistics report. *)letevent_value=Internal.event_value(** [draw ?label tc gen] produces a typed value from the printable generator
[gen]. On the final replay of a failing test, an outermost draw prints its
value. See {!Generators.draw}. *)letdraw=Generators.draw(** [draw_named ~label ~repeatable tc gen] is the naming-aware draw the
[let%hegel_test] PPX rewrites bindings to; not intended for direct use
(prefer {!draw}). See {!Generators.draw_named}. *)letdraw_named=Generators.draw_named(** [draw_silent tc gen] is {!draw} without printing the value on the final
replay, and accepts a generator with no printer. *)letdraw_silent=Generators.draw_silent(** [draw_silent_named ~name tc gen] is the naming-aware {!draw_silent} the
[let%hegel_test] PPX rewrites bindings to; not intended for direct use
(prefer {!draw_silent}). See {!Generators.draw_silent_named}. *)letdraw_silent_named=Generators.draw_silent_named(** [clone tc] forks an independent clone of [tc] for driving generation
concurrently. Its native resources are owned by the test case and freed
once the case completes. See {!Internal.clone}. *)letclone=Internal.clone(** [with_printer sexp_of gen] attaches [sexp_of] so [gen] can be drawn with
{!draw}. See {!Generators.with_printer}. *)let%templatewith_printer=Generators.with_printer[@modem][@@modem=(nonportable,portable)];;