()
| 1089 | #[should_panic(expected = "async resource limiter table growing")] |
| 1090 | #[cfg_attr(miri, ignore)] |
| 1091 | async fn panic_in_async_table_limiter() { |
| 1092 | let engine = Engine::default(); |
| 1093 | let linker = Linker::<Panic>::new(&engine); |
| 1094 | |
| 1095 | let module = Module::new(&engine, r#"(module (table (export "t") 0 funcref))"#).unwrap(); |
| 1096 | |
| 1097 | let mut store = Store::new(&engine, Panic); |
| 1098 | store.limiter_async(|s| s as &mut dyn ResourceLimiterAsync); |
| 1099 | let instance = linker.instantiate_async(&mut store, &module).await.unwrap(); |
| 1100 | let table = instance.get_table(&mut store, "t").unwrap(); |
| 1101 | |
| 1102 | // Grow the table, which should panic |
| 1103 | table |
| 1104 | .grow_async(&mut store, 3, Ref::Func(None)) |
| 1105 | .await |
| 1106 | .unwrap(); |
| 1107 | } |
| 1108 | |
| 1109 | #[test] |
| 1110 | #[cfg_attr(miri, ignore)] |
nothing calls this directly
no test coverage detected