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
412 B
13 lines
412 B
use anyhow::Result;
|
|
use wasmtime::*;
|
|
|
|
#[test]
|
|
fn wrong_import_numbers() -> Result<()> {
|
|
let store = Store::default();
|
|
let module = Module::new(store.engine(), r#"(module (import "" "" (func)))"#)?;
|
|
|
|
assert!(Instance::new(&store, &module, &[]).is_err());
|
|
let func = Func::wrap(&store, || {});
|
|
assert!(Instance::new(&store, &module, &[func.clone().into(), func.into()]).is_err());
|
|
Ok(())
|
|
}
|
|
|