| 71 | } |
| 72 | |
| 73 | void check_trap(wasm_func_t* func, int i, wasm_val_t args[]) { |
| 74 | wasm_val_t r = WASM_INIT_VAL; |
| 75 | wasm_val_vec_t args_ = {i, args}; |
| 76 | wasm_val_vec_t results = {1, &r}; |
| 77 | own wasm_trap_t* trap = wasm_func_call(func, &args_, &results); |
| 78 | if (! trap) { |
| 79 | printf("> Error on result, expected trap\n"); |
| 80 | exit(1); |
| 81 | } |
| 82 | wasm_trap_delete(trap); |
| 83 | } |
| 84 | |
| 85 | void check_trap1(wasm_func_t* func, int32_t arg) { |
| 86 | wasm_val_t args[] = { WASM_I32_VAL(arg) }; |
no test coverage detected