MCPcopy Create free account
hub / github.com/WebAssembly/wasm-c-api / check_ok

Function check_ok

example/memory.c:59–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void check_ok(wasm_func_t* func, int i, wasm_val_t args[]) {
60 wasm_val_vec_t args_ = {i, args};
61 wasm_val_vec_t results = {0, NULL};
62 if (wasm_func_call(func, &args_, &results)) {
63 printf("> Error on result, expected empty\n");
64 exit(1);
65 }
66}
67
68void check_ok2(wasm_func_t* func, int32_t arg1, int32_t arg2) {
69 wasm_val_t args[] = { WASM_I32_VAL(arg1), WASM_I32_VAL(arg2) };

Callers 1

check_ok2Function · 0.70

Calls 1

wasm_func_callFunction · 0.85

Tested by

no test coverage detected