MCPcopy Index your code
hub / github.com/nodejs/node / assertAllDataViewMethodsThrow

Function assertAllDataViewMethodsThrow

deps/v8/test/mjsunit/typedarray-helpers.js:397–406  ·  view source on GitHub ↗
(view, index, errorType)

Source from the content-addressed store, hash-verified

395}
396
397function assertAllDataViewMethodsThrow(view, index, errorType) {
398 for (const [getter, setter, size, isBigInt] of dataViewAccessorsAndSizes) {
399 if (isBigInt) {
400 assertThrows(() => { setter.call(view, index, 3n); }, errorType);
401 } else {
402 assertThrows(() => { setter.call(view, index, 3); }, errorType);
403 }
404 assertThrows(() => { getter.call(view, index); }, errorType);
405 }
406}
407
408function ObjectDefinePropertyHelper(ta, index, value) {
409 if (ta instanceof BigInt64Array || ta instanceof BigUint64Array) {

Calls 2

assertThrowsFunction · 0.50
callMethod · 0.45

Tested by

no test coverage detected