()
| 35 | |
| 36 | #[test] |
| 37 | fn forward_call_works() -> Result<()> { |
| 38 | let mut store = store_with_padding(PADDING)?; |
| 39 | let module = Module::new( |
| 40 | store.engine(), |
| 41 | r#" |
| 42 | (module |
| 43 | (func (export "foo") (result i32) |
| 44 | call 1) |
| 45 | (func (result i32) |
| 46 | i32.const 4) |
| 47 | ) |
| 48 | "#, |
| 49 | )?; |
| 50 | |
| 51 | let i = Instance::new(&mut store, &module, &[])?; |
| 52 | let foo = i.get_typed_func::<(), i32>(&mut store, "foo")?; |
| 53 | assert_eq!(foo.call(&mut store, ())?, 4); |
| 54 | Ok(()) |
| 55 | } |
| 56 | |
| 57 | #[test] |
| 58 | fn backwards_call_works() -> Result<()> { |
nothing calls this directly
no test coverage detected