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

Function testReadData

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

Source from the content-addressed store, hash-verified

34 }
35
36 function testReadData (dataview, type, offset, value) {
37 jsWriteDataView(dataview, type, offset, 0);
38 assert.strictEqual(jsReadDataView(dataview, type, offset), 0);
39
40 jsWriteDataView(dataview, type, offset, value);
41 assert.strictEqual(
42 nativeReadDataView(dataview, type, offset), expected(type, value));
43 }
44
45 function testWriteData (dataview, type, offset, value) {
46 jsWriteDataView(dataview, type, offset, 0);

Callers 1

testFunction · 0.85

Calls 4

jsWriteDataViewFunction · 0.85
jsReadDataViewFunction · 0.85
nativeReadDataViewFunction · 0.85
expectedFunction · 0.85

Tested by 1

testFunction · 0.68