Module For_external.Expectation

The functions below are more thoroughly documented in the public interface in Expect_test_helpers_base

val is_active : here:lexing_position -> Base.unit -> Base.bool

There is an active expectation from the time that test execution encounters an [%expectation] until one of commit or skip is called.

val commit : here:lexing_position -> Base.unit -> Base.unit

Can be run exactly once upon encountering an [%expectation]. Accepts the test result as though that expectation was an [%expect].

val skip : here:lexing_position -> Base.unit -> Base.unit

Can be run exactly once upon encountering an [%expectation]. Ignores the result for this [%expectation].

Each of the following functions can be run arbitrarily many times between encountering an [%expectation] and calling commit or skip

val sexp_for_debugging : here:lexing_position -> Base.unit -> Base.Sexp.t

Produce a sexp representing the state of the most recently encountered [%expectation]

val is_successful : here:lexing_position -> Base.unit -> Base.bool

Whether calling commit for the current [%expectation] would produce a test failure

val actual : here:lexing_position -> Base.unit -> Base.string

Output collected at the current [%expectation]

val expected : here:lexing_position -> Base.unit -> Base.string Base.option

Output expected at the current [%expectation]