about summary refs log tree commit diff
path: root/users/glittershark/achilles/src/parser/macros.rs
blob: 406e5c0e699ee7a5cd078f707922598148b12b70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[cfg(test)]
#[macro_use]
macro_rules! test_parse {
    ($parser: ident, $src: expr) => {{
        let res = $parser($src);
        nom_trace::print_trace!();
        let (rem, res) = res.unwrap();
        assert!(
            rem.is_empty(),
            "non-empty remainder: \"{}\", parsed: {:?}",
            rem,
            res
        );
        res
    }};
}