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

Function assertMemoryEquals

deps/v8/test/mjsunit/wasm/multi-memory64.js:8–16  ·  view source on GitHub ↗
(expected, memory)

Source from the content-addressed store, hash-verified

6d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
7
8function assertMemoryEquals(expected, memory) {
9 assertInstanceof(memory, WebAssembly.Memory);
10 assertInstanceof(expected, Uint8Array);
11 const buf = new Uint8Array(memory.buffer);
12 // For better output, check the first 50 bytes separately first.
13 assertEquals(expected.slice(0, 50), buf.slice(0, 50));
14 // Now also check the full memory content.
15 assertEquals(expected, buf);
16}
17
18(function testBasicMultiMemory() {
19 print(arguments.callee.name);

Callers 1

multi-memory64.jsFile · 0.70

Calls 3

assertInstanceofFunction · 0.85
sliceMethod · 0.65
assertEqualsFunction · 0.50

Tested by

no test coverage detected