| 26 | } |
| 27 | |
| 28 | void check_call(wasmtime_context_t *store, wasmtime_func_t *func, |
| 29 | const wasmtime_val_t *args, size_t nargs, int32_t expected) { |
| 30 | wasmtime_val_t results[1]; |
| 31 | wasm_trap_t *trap = NULL; |
| 32 | wasmtime_error_t *error = |
| 33 | wasmtime_func_call(store, func, args, nargs, results, 1, &trap); |
| 34 | if (error != NULL || trap != NULL) |
| 35 | exit_with_error("failed to call function", error, trap); |
| 36 | if (results[0].of.i32 != expected) { |
| 37 | printf("> Error on result\n"); |
| 38 | exit(1); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | void check_call0(wasmtime_context_t *store, wasmtime_func_t *func, |
| 43 | int32_t expected) { |
no test coverage detected