test(runtime-core) Test host functions without a vm::Ctx argument.

This commit is contained in:
Ivan Enderlin
2019-10-30 14:58:57 +01:00
parent 95e1b85c56
commit 7eef49be12
2 changed files with 35 additions and 0 deletions

View File

@ -643,7 +643,12 @@ mod tests {
vec![$($x),*].iter().sum()
}
fn without_vmctx($($x: i32),*) -> i32 {
vec![$($x),*].iter().sum()
}
let _func = Func::new(with_vmctx);
let _func = Func::new(without_vmctx);
}
}
}
@ -654,7 +659,12 @@ mod tests {
0
}
fn bar() -> i32 {
0
}
let _ = Func::new(foo);
let _ = Func::new(bar);
}
test_func_arity_n!(test_func_arity_1, a);