()
| 100 | |
| 101 | #[test] |
| 102 | fn instance_get_export() -> Result<()> { |
| 103 | let module_bytes = { |
| 104 | let mut config = Config::new(); |
| 105 | config.concurrency_support(false); |
| 106 | let engine = Engine::new(&config)?; |
| 107 | Module::new(&engine, "(module (func (export \"f\")))")?.serialize()? |
| 108 | }; |
| 109 | let mut config = Config::new(); |
| 110 | config.enable_compiler(false); |
| 111 | config.concurrency_support(false); |
| 112 | let engine = Engine::new(&config)?; |
| 113 | let module = unsafe { Module::deserialize(&engine, &module_bytes)? }; |
| 114 | let linker = Linker::<()>::new(&engine); |
| 115 | let instance_pre = linker.instantiate_pre(&module)?; |
| 116 | |
| 117 | OomTest::new().test(|| { |
| 118 | let mut store = Store::try_new(&engine, ())?; |
| 119 | let instance = instance_pre.instantiate(&mut store)?; |
| 120 | let _export = instance.get_export(&mut store, "f"); |
| 121 | Ok(()) |
| 122 | }) |
| 123 | } |
| 124 | |
| 125 | #[test] |
| 126 | fn instance_exports() -> Result<()> { |
nothing calls this directly
no test coverage detected