()
| 28 | |
| 29 | #[test] |
| 30 | fn loops_interruptible() -> wasmtime::Result<()> { |
| 31 | let mut store = interruptible_store(); |
| 32 | let module = Module::new(store.engine(), r#"(func (export "loop") (loop br 0))"#)?; |
| 33 | let instance = Instance::new(&mut store, &module, &[])?; |
| 34 | let iloop = instance.get_typed_func::<(), ()>(&mut store, "loop")?; |
| 35 | store.engine().increment_epoch(); |
| 36 | let trap = iloop.call(&mut store, ()).unwrap_err().downcast::<Trap>()?; |
| 37 | assert_eq!(trap, Trap::Interrupt); |
| 38 | Ok(()) |
| 39 | } |
| 40 | |
| 41 | #[test] |
| 42 | fn functions_interruptible() -> wasmtime::Result<()> { |
nothing calls this directly
no test coverage detected