Skip to main content

assert_parse

Macro assert_parse 

Source
macro_rules! assert_parse {
    ($parse_fn:expr, $input:expr, $expected_sexp:expr) => { ... };
    ($parse_fn:expr, $input:expr, $expected_sexp:expr, $options:expr) => { ... };
}
Expand description

Assert that parsing input with parse_fn produces a tree matching expected_sexp.

Example:

assert_parse!(|s| leekscript::parse(s), "1 + 2", "(ROOT (EXPR ...))");