()
| 46 | #[test] |
| 47 | #[cfg_attr(miri, ignore)] |
| 48 | fn test_module_serialize_simple() -> Result<()> { |
| 49 | let buffer = serialize( |
| 50 | &Engine::default(), |
| 51 | "(module (func (export \"run\") (result i32) i32.const 42))", |
| 52 | )?; |
| 53 | |
| 54 | let mut store = Store::default(); |
| 55 | let instance = unsafe { deserialize_and_instantiate(&mut store, &buffer)? }; |
| 56 | let run = instance.get_typed_func::<(), i32>(&mut store, "run")?; |
| 57 | let result = run.call(&mut store, ())?; |
| 58 | |
| 59 | assert_eq!(42, result); |
| 60 | Ok(()) |
| 61 | } |
| 62 | |
| 63 | #[test] |
| 64 | #[cfg_attr(miri, ignore)] |
nothing calls this directly
no test coverage detected