MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / testWriteData

Function testWriteData

test/dataview/dataview_read_write.js:45–52  ·  view source on GitHub ↗
(dataview, type, offset, value)

Source from the content-addressed store, hash-verified

43 }
44
45 function testWriteData (dataview, type, offset, value) {
46 jsWriteDataView(dataview, type, offset, 0);
47 assert.strictEqual(jsReadDataView(dataview, type, offset), 0);
48
49 nativeWriteDataView(dataview, type, offset, value);
50 assert.strictEqual(
51 jsReadDataView(dataview, type, offset), expected(type, value));
52 }
53
54 function testInvalidOffset (dataview, type, offset, value) {
55 assert.throws(() => {

Callers 1

testFunction · 0.85

Calls 4

jsWriteDataViewFunction · 0.85
jsReadDataViewFunction · 0.85
nativeWriteDataViewFunction · 0.85
expectedFunction · 0.85

Tested by 1

testFunction · 0.68