()
| 10 | |
| 11 | #[test] |
| 12 | fn test_unload_engine() { |
| 13 | for _ in 0..3 { |
| 14 | std::thread::spawn(|| { |
| 15 | let engine = Engine::default(); |
| 16 | { |
| 17 | let module = |
| 18 | Module::new(&engine, r#"(module (func (export "x") unreachable))"#).unwrap(); |
| 19 | let mut store = Store::new(&engine, ()); |
| 20 | let instance = Instance::new(&mut store, &module, &[]).unwrap(); |
| 21 | let func = instance.get_typed_func::<(), ()>(&mut store, "x").unwrap(); |
| 22 | assert!(func.call(&mut store, ()).unwrap_err().is::<Trap>()); |
| 23 | } |
| 24 | unsafe { |
| 25 | engine.unload_process_handlers(); |
| 26 | } |
| 27 | }) |
| 28 | .join() |
| 29 | .unwrap(); |
| 30 | } |
| 31 | } |
nothing calls this directly
no test coverage detected