[][src]Macro rune_testing::assert_vm_error

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

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

Examples

use rune_testing::*;

assert_vm_error!(
    r#"
    fn main() {
        let a = 9223372036854775807;
        let b = 2;
        a += b;
    }
    "#,
    Overflow => {}
);