| 33 | } |
| 34 | |
| 35 | void check_call(wasm_func_t* func, int i, wasm_val_t args[], int32_t expected) { |
| 36 | wasm_val_t r = WASM_INIT_VAL; |
| 37 | wasm_val_vec_t args_ = {i, args}; |
| 38 | wasm_val_vec_t results = {1, &r}; |
| 39 | if (wasm_func_call(func, &args_, &results) || r.of.i32 != expected) { |
| 40 | printf("> Error on result\n"); |
| 41 | exit(1); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | void check_call0(wasm_func_t* func, int32_t expected) { |
| 46 | check_call(func, 0, NULL, expected); |
no test coverage detected