[][src]Macro rune_testing::assert_warnings

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

Assert that the given rune program parses, but raises the specified set of warnings.

Examples

use rune_testing::*;

assert_warnings! {
    r#"fn main() { `Hello World` }"#,
    TemplateWithoutExpansions { span, .. } => {
        assert_eq!(span, Span::new(12, 25));
    }
};