Legend:
Library
Module
Module type
Parameter
Class
Class type
Concrete syntax tree of expectations and actual outputs
These types represent the contents of an %expect node or of the actual output. We keep information about the original layout so that we can give an corrected expectation that follows the original formatting.
In the following names, blank means ' ' or '\t', while space means blank or newline.
Single line represent %expect nodes with data on the first line but not on the subsequent ones.
For instance:
[%expect " blah "];
[%expect {| blah
|}]
val sexp_of_single_line :
('a->Expect_test_matcher__.Import.Ppx_sexp_conv_lib.Sexp.t)->'asingle_line->Expect_test_matcher__.Import.Ppx_sexp_conv_lib.Sexp.t
Any %expect node with one or more newlines and at least one non-blank line.
This also include the case with exactly one non-blank line such as:
[%expect {|
blah
|}]
This is to preserve this formatting in case the correction is multi-line.
leading_spaces contains everything until the first non-blank line, while trailing_spaces is either:
trailing blanks on the last line if of the form:
[%expect {|
abc
def |}]
all trailing spaces from the newline character (inclusive) on the last non-blank line to the end if of the form:
[%expect {|
abc
def
|}]
val sexp_of_multi_lines :
('a->Expect_test_matcher__.Import.Ppx_sexp_conv_lib.Sexp.t)->'amulti_lines->Expect_test_matcher__.Import.Ppx_sexp_conv_lib.Sexp.t