[][src]Macro rune_testing::assert_compile_error

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

Assert that the given rune program raises a compile error.

Examples

use rune_testing::*;

assert_compile_error! {
    r#"fn main() { break; }"#,
    BreakOutsideOfLoop { span } => {
        assert_eq!(span, Span::new(12, 17));
    }
};