MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / assert_my_funcref

Function assert_my_funcref

tests/all/func.rs:1606–1611  ·  view source on GitHub ↗
(mut store: impl AsContextMut, func: Option<&Func>)

Source from the content-addressed store, hash-verified

1604 let mut results = [Val::I32(0), Val::I32(0)];
1605
1606 fn assert_my_funcref(mut store: impl AsContextMut, func: Option<&Func>) -> Result<()> {
1607 let mut store = store.as_context_mut();
1608 let func = func.unwrap();
1609 assert_eq!(func.typed::<(), u32>(&store)?.call(&mut store, ())?, 100);
1610 Ok(())
1611 }
1612 fn assert_my_externref(store: impl AsContext, externref: Option<Rooted<ExternRef>>) {
1613 assert_eq!(
1614 externref

Callers 1

Calls 3

OkFunction · 0.85
as_context_mutMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected