123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178(** The current version of Hegel for OCaml. *)letversion="0.12.2"(** Generators for composable test data generation. *)moduleGenerators=Generators(** Stateful property-based testing on top of {!Generators}. *)moduleStateful=Stateful(** Runtime support called by [@@deriving hegel_generator]-generated code; not
intended for direct use. *)moduleDerive=Derive(** Test runner and run-loop internals; re-exported (doc-hidden) for white-box
tests, not for direct use. *)moduleInternal=Internal(** Antithesis integration; re-exported (doc-hidden) for white-box tests. *)moduleAntithesis=Antithesis(* Settings, test-case, and test-location types re-exported so the whole
public API lives directly under Hegel. The module re-exports above are all
doc-hidden in the mli: Derive is called by generated code, the rest are
white-box surfaces for the test suite. *)typetest_case=Internal.test_casetypetest_location=Antithesis.test_location={function_name:string;file:string;begin_line:int}typeverbosity=Internal.verbosity=|Quiet|Normal|Verbose|Debugtypedatabase=Internal.database=|Unset|Disabled|Pathofstringtypemode=Internal.mode=|Test_run|Single_test_casetypephase=Internal.phase=|Explicit|Reuse|Generate|Target|Shrinktypehealth_check=Internal.health_check=|Filter_too_much|Too_slow|Test_cases_too_large|Large_initial_test_casetypesettings=Internal.settings={mode:mode;test_cases:int;stateful_step_count:int;verbosity:verbosity;seed:intoption;derandomize:bool;database:database;suppress_health_check:health_checklist;phases:phaselistoption;print_blob:bool;report_multiple_failures:bool}exceptionAssume_rejected=Internal.Assume_rejected(** {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
{!default_settings}. 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 value label] sends a target command to guide the search engine
toward higher values. *)lettarget=Internal.target(** [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 from
another thread; its native resources are freed by a GC finaliser once the
clone is unreachable. See {!Internal.clone}. *)letclone=Internal.clonetype'aworker='aInternal.worker(** [spawn tc f] runs [f] on a fresh clone of [tc] on a new thread. See
{!Internal.spawn}. *)letspawn=Internal.spawn(** [join w] waits for worker [w] and returns its result, re-raising any exception
the worker raised. See {!Internal.join}. *)letjoin=Internal.join(** [with_printer sexp_of gen] attaches [sexp_of] so [gen] can be drawn with
{!draw}. See {!Generators.with_printer}. *)letwith_printer=Generators.with_printer(** [default_settings ()] creates default test settings with CI auto-detection.
*)letdefault_settings=Internal.default_settings(** [settings ?test_cases ?seed ()] creates settings with the given overrides
applied to {!default_settings}. Convenience constructor for common cases. *)letsettings=Internal.settingsletwith_test_cases=Internal.with_test_casesletwith_stateful_step_count=Internal.with_stateful_step_countletwith_verbosity=Internal.with_verbosityletwith_seed=Internal.with_seedletwith_derandomize=Internal.with_derandomizeletwith_database=Internal.with_databaseletwith_suppress_health_check=Internal.with_suppress_health_checkletwith_phases=Internal.with_phasesletwith_mode=Internal.with_modeletwith_print_blob=Internal.with_print_blobletwith_report_multiple_failures=Internal.with_report_multiple_failures