Ppx_expect
is a framework for writing tests in OCaml, similar to
Cram. Ppx_expect
mimics the existing inline
tests framework with the let%expect_test
construct. The body of an
expect-test can contain output-generating code, interleaved with %expect
extension expressions to denote the expected output.
When run, these tests will pass iff the output matches what was expected. If
a test fails, a corrected file with the suffix ".corrected" will be produced
with the actual output, and the inline_tests_runner
will output a diff.