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

Function checkGet

deps/v8/test/mjsunit/harmony/dataview-accessors.js:63–74  ·  view source on GitHub ↗
(func, index, expected, littleEndian)

Source from the content-addressed store, hash-verified

61}
62
63function checkGet(func, index, expected, littleEndian) {
64 function doGet() {
65 if (littleEndian != undefined)
66 return view["get" + func](index, littleEndian);
67 else
68 return view["get" + func](index);
69 }
70 if (index >=0 && index + getElementSize(func) - 1 < view.byteLength)
71 assertSame(expected, doGet());
72 else
73 assertThrows(doGet, RangeError);
74}
75
76function checkSet(func, index, value, littleEndian) {
77 function doSet() {

Callers 2

checkSetFunction · 0.70
testFunction · 0.70

Calls 4

getElementSizeFunction · 0.85
doGetFunction · 0.85
assertSameFunction · 0.50
assertThrowsFunction · 0.50

Tested by 1

testFunction · 0.56