()
| 193 | #[test] |
| 194 | #[cfg_attr(miri, ignore)] |
| 195 | fn allow_unknown_exports() -> Result<()> { |
| 196 | let mut store = Store::<()>::default(); |
| 197 | let mut linker = Linker::new(store.engine()); |
| 198 | let module = Module::new( |
| 199 | store.engine(), |
| 200 | r#"(module (func (export "_start")) (global (export "g") i32 (i32.const 0)))"#, |
| 201 | )?; |
| 202 | |
| 203 | assert!(linker.module(&mut store, "module", &module).is_err()); |
| 204 | |
| 205 | let mut linker = Linker::new(store.engine()); |
| 206 | linker.allow_unknown_exports(true); |
| 207 | linker.module(&mut store, "module", &module)?; |
| 208 | |
| 209 | Ok(()) |
| 210 | } |
| 211 | |
| 212 | #[test] |
| 213 | #[cfg_attr(miri, ignore)] |
nothing calls this directly
no test coverage detected