| 61 | } |
| 62 | |
| 63 | void check_trap(const wasm::Func* func, wasm::Val&& arg1, wasm::Val&& arg2) { |
| 64 | auto args = wasm::vec<wasm::Val>::make(std::move(arg1), std::move(arg2)); |
| 65 | auto results = wasm::vec<wasm::Val>::make_uninitialized(1); |
| 66 | if (! func->call(args, results)) { |
| 67 | std::cout << "> Error on result, expected trap" << std::endl; |
| 68 | exit(1); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | void run() { |
| 73 | // Initialize. |