()
| 56 | |
| 57 | #[test] |
| 58 | fn backwards_call_works() -> Result<()> { |
| 59 | let mut store = store_with_padding(PADDING)?; |
| 60 | let module = Module::new( |
| 61 | store.engine(), |
| 62 | r#" |
| 63 | (module |
| 64 | (func (result i32) |
| 65 | i32.const 4) |
| 66 | (func (export "foo") (result i32) |
| 67 | call 0) |
| 68 | ) |
| 69 | "#, |
| 70 | )?; |
| 71 | |
| 72 | let i = Instance::new(&mut store, &module, &[])?; |
| 73 | let foo = i.get_typed_func::<(), i32>(&mut store, "foo")?; |
| 74 | assert_eq!(foo.call(&mut store, ())?, 4); |
| 75 | Ok(()) |
| 76 | } |
| 77 | |
| 78 | #[test] |
| 79 | fn mixed() -> Result<()> { |
nothing calls this directly
no test coverage detected