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

Function smoke

tests/all/async_functions.rs:25–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24#[tokio::test]
25async fn smoke() {
26 let mut store = async_store();
27 let func_ty = FuncType::new(store.engine(), None, None);
28 let func = Func::new_async(&mut store, func_ty, move |_caller, _params, _results| {
29 Box::new(async { Ok(()) })
30 });
31 run_smoke_test(&mut store, func).await;
32 run_smoke_typed_test(&mut store, func).await;
33
34 let func = Func::wrap_async(&mut store, move |_caller, _: ()| Box::new(async { Ok(()) }));
35 run_smoke_test(&mut store, func).await;
36 run_smoke_typed_test(&mut store, func).await;
37}
38
39#[tokio::test]
40async fn smoke_host_func() -> Result<()> {

Callers

nothing calls this directly

Calls 6

OkFunction · 0.85
run_smoke_testFunction · 0.85
run_smoke_typed_testFunction · 0.85
async_storeFunction · 0.70
newFunction · 0.50
engineMethod · 0.45

Tested by

no test coverage detected