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

Function check_ok

example/memory.cc:35–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34template<class... Args>
35void check_ok(const wasm::Func* func, Args... xs) {
36 auto args = wasm::vec<wasm::Val>::make(wasm::Val::i32(xs)...);
37 auto results = wasm::vec<wasm::Val>::make();
38 if (func->call(args, results)) {
39 std::cout << "> Error on result, expected return" << std::endl;
40 exit(1);
41 }
42}
43
44template<class... Args>
45void check_trap(const wasm::Func* func, Args... xs) {

Callers 1

runFunction · 0.70

Calls 1

callMethod · 0.80

Tested by

no test coverage detected