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

Function check

example/hostref.cc:105–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void check(wasm::own<wasm::Ref> actual, const wasm::Ref* expected) {
106 if (actual.get() != expected &&
107 !(actual && expected && actual->same(expected))) {
108 std::cout << "> Error reading reference, expected "
109 << (expected ? expected->get_host_info() : nullptr) << ", got "
110 << (actual ? actual->get_host_info() : nullptr) << std::endl;
111 exit(1);
112 }
113}
114
115void run() {
116 // Initialize.

Callers 1

runFunction · 0.70

Calls 3

sameMethod · 0.80
getMethod · 0.45
get_host_infoMethod · 0.45

Tested by

no test coverage detected