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

Function check_table

example/table.c:45–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void check_table(wasm_table_t* table, int32_t i, bool expect_set) {
46 own wasm_ref_t* ref = wasm_table_get(table, i);
47 check((ref != NULL) == expect_set);
48 if (ref) wasm_ref_delete(ref);
49}
50
51void check_call(wasm_func_t* func, int32_t arg1, int32_t arg2, int32_t expected) {
52 wasm_val_t vs[2] = { WASM_I32_VAL(arg1), WASM_I32_VAL(arg2) };

Callers 1

mainFunction · 0.85

Calls 2

wasm_table_getFunction · 0.85
checkFunction · 0.70

Tested by

no test coverage detected