[][src]Macro rune_testing::assert_parse_error

macro_rules! assert_parse_error {
    ($source:expr, $pat:pat => $cond:expr) => { ... };
}

Assert that the given parse error happens with the given rune program.

Examples

use rune_testing::*;

assert_parse_error! {
    r#"fn main() { 0 < 10 >= 10 }"#,
    PrecedenceGroupRequired { span } => {
        assert_eq!(span, Span::new(12, 18));
    }
};