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

Function CheckAccessor

deps/v8/test/mjsunit/harmony/dataview-accessors.js:398–405  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

396function TestGeneralAccessors() {
397 var a = new DataView(new ArrayBuffer(256));
398 function CheckAccessor(name) {
399 var f = a[name];
400 assertThrows(function() { f(); }, TypeError);
401 f.call(a, 0, 0); // should not throw
402 assertThrows(function() { f.call({}, 0, 0); }, TypeError);
403 f.call(a);
404 f.call(a, 1); // should not throw
405 }
406 CheckAccessor("getUint8");
407 CheckAccessor("setUint8");
408 CheckAccessor("getInt8");

Callers 1

TestGeneralAccessorsFunction · 0.85

Calls 3

fFunction · 0.70
assertThrowsFunction · 0.50
callMethod · 0.45

Tested by

no test coverage detected