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

Function testElementType

deps/v8/test/mjsunit/asm/atomics-load.js:63–74  ·  view source on GitHub ↗
(taConstr, f, offset)

Source from the content-addressed store, hash-verified

61}
62
63function testElementType(taConstr, f, offset) {
64 clearArray();
65
66 var ta = new taConstr(sab, offset);
67 var name = Object.prototype.toString.call(ta);
68 ta[0] = 10;
69 assertEquals(10, f(0), name);
70 assertEquals(0, f(1), name);
71 // out of bounds
72 assertThrows(function() { f(-1); });
73 assertThrows(function() { f(ta.length); });
74}
75
76function testElement(m, offset) {
77 testElementType(Int8Array, m.loadi8, offset);

Callers 1

testElementFunction · 0.70

Calls 5

clearArrayFunction · 0.70
fFunction · 0.70
assertEqualsFunction · 0.50
assertThrowsFunction · 0.50
callMethod · 0.45

Tested by

no test coverage detected