| 91 | } |
| 92 | |
| 93 | auto call_i_r(const wasm::Func* func, int32_t i) -> wasm::own<wasm::Ref> { |
| 94 | std::cout << "call_i_r... " << std::flush; |
| 95 | auto args = wasm::vec<wasm::Val>::make(wasm::Val::i32(i)); |
| 96 | auto results = wasm::vec<wasm::Val>::make_uninitialized(1); |
| 97 | if (func->call(args, results)) { |
| 98 | std::cout << "> Error calling function!" << std::endl; |
| 99 | exit(1); |
| 100 | } |
| 101 | std::cout << "okay" << std::endl; |
| 102 | return results[0].release_ref(); |
| 103 | } |
| 104 | |
| 105 | void check(wasm::own<wasm::Ref> actual, const wasm::Ref* expected) { |
| 106 | if (actual.get() != expected && |
no test coverage detected