()
| 73 | |
| 74 | #[tokio::test] |
| 75 | async fn smoke_with_suspension() { |
| 76 | let mut store = async_store(); |
| 77 | let func_ty = FuncType::new(store.engine(), None, None); |
| 78 | let func = Func::new_async(&mut store, func_ty, move |_caller, _params, _results| { |
| 79 | Box::new(async { |
| 80 | tokio::task::yield_now().await; |
| 81 | Ok(()) |
| 82 | }) |
| 83 | }); |
| 84 | run_smoke_test(&mut store, func).await; |
| 85 | run_smoke_typed_test(&mut store, func).await; |
| 86 | |
| 87 | let func = Func::wrap_async(&mut store, move |_caller, _: ()| { |
| 88 | Box::new(async { |
| 89 | tokio::task::yield_now().await; |
| 90 | Ok(()) |
| 91 | }) |
| 92 | }); |
| 93 | run_smoke_test(&mut store, func).await; |
| 94 | run_smoke_typed_test(&mut store, func).await; |
| 95 | } |
| 96 | |
| 97 | #[tokio::test] |
| 98 | async fn smoke_host_func_with_suspension() -> Result<()> { |
nothing calls this directly
no test coverage detected