Ppx_expect_runtime.For_externalFunctions for other libraries to interact with expect tests.
val read_current_test_output_exn :
here:Base.Source_code_position.t ->
Base.stringIf there is an expect test running, perform a consuming read of the current output and return it without any sanitization or backtrace-checking. Note that this is different from the behavior of [%expect.output], which does perform sanitization.
If there is no test running, raise an error that includes here.
val current_expect_test_name_exn :
here:Base.Source_code_position.t ->
Base.string Base.option @@ portableThe name of the currently-running expect-test.
If there is no test running, raise an error that includes here.
val default_cr_for_multiple_outputs :
output_name:Base.string ->
outputs:Base.string Base.list ->
Base.string @@ portableval current_test_has_output_that_does_not_match_exn :
here:Base.Source_code_position.t ->
Base.bool @@ portableIf the current test has reached a [%expect], [%expect_exact], or [%expect.if_reached] node whose output does not match the expected output, or if it has reached a [%expect.unreachable] node at all, returns true.
If the current test does not meet those criteria, returns false.
If there is no current test running, raises an error including here.
module Stack_frame : sig ... endmodule Match_or_mismatch : sig ... endval push_output_exn :
here:Base.Source_code_position.t ->
Stack_frame.t @@ portablePush current output onto a notional stack. Until the output is popped, it will be excluded from read_current_test_output_exn.
val pop_output_exn :
here:Base.Source_code_position.t ->
Stack_frame.t ->
Match_or_mismatch.t @@ portablePop the top output stack frame, which must be the given frame. Returns Mismatch if the stack frame is not popped in the correct order.
module Expectation : sig ... endThe functions below are more thoroughly documented in the public interface in Expect_test_helpers_base