You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
388 B
13 lines
388 B
use anyhow::Result;
|
|
use wasmtime::*;
|
|
|
|
#[test]
|
|
fn wrong_import_numbers() -> Result<()> {
|
|
let store = Store::default();
|
|
let module = Module::new(&store, r#"(module (import "" "" (func)))"#)?;
|
|
|
|
assert!(Instance::new(&module, &[]).is_err());
|
|
let func = Func::wrap(&store, || {});
|
|
assert!(Instance::new(&module, &[func.clone().into(), func.into()]).is_err());
|
|
Ok(())
|
|
}
|
|
|