MCPcopy Create free account
hub / github.com/nodejs/node / doTest

Function doTest

deps/v8/test/mjsunit/wasm/asm-wasm-expr.js:126–137  ·  view source on GitHub ↗
(asm_source, orig)

Source from the content-addressed store, hash-verified

124 }
125
126 function doTest(asm_source, orig) {
127 var nonasm_source = asm_source.replace(new RegExp("use asm"), "");
128 print("Testing JS: " + orig);
129 var js_module = eval("(" + nonasm_source + ")")(stdlib, {}, buffer);
130 expect(js_module);
131
132 print("Testing ASMJS: " + orig);
133 var asmfunc = eval("(" + asm_source + ")");
134 var asm_module = asmfunc(stdlib, {}, buffer);
135 assertTrue(%IsAsmWasmCode(asmfunc));
136 expect(asm_module);
137 }
138
139 function expect(module) { module.main(0, 0, 0); print(" ok"); return true; }
140}

Callers 1

DoTheTestsFunction · 0.70

Calls 4

expectFunction · 0.70
printFunction · 0.50
evalFunction · 0.50
assertTrueFunction · 0.50

Tested by

no test coverage detected