mun_runtime 0.3.0

A runtime for hot reloading and invoking Mun from Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![allow(unused_macros)]

macro_rules! assert_invoke_eq {
    ($ExpectedType:ty, $ExpectedResult:expr, $Driver:expr, $($Arg:tt)+) => {
        {
            let runtime = $Driver.runtime();
            let runtime_ref = runtime.borrow();
            let result: $ExpectedType = mun_runtime::invoke_fn!(runtime_ref, $($Arg)*).unwrap();
            assert_eq!(
                result, $ExpectedResult, "{} == {:?}",
                stringify!(mun_runtime::invoke_fn!(runtime_ref, $($Arg)*).unwrap()),
                $ExpectedResult
            );
        }
    }
}