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

Function makeWtf16TestDataSegment

deps/v8/test/mjsunit/wasm/imported-strings.js:689–701  ·  view source on GitHub ↗
(strings)

Source from the content-addressed store, hash-verified

687}
688
689function makeWtf16TestDataSegment(strings) {
690 let data = []
691 let valid = {};
692
693 for (let str of strings) {
694 valid[str] = { offset: data.length, length: str.length };
695 for (let byte of encodeWtf16LE(str)) {
696 data.push(byte);
697 }
698 }
699
700 return { valid, data: Uint8Array.from(data) };
701};
702
703(function TestStringNewWtf16Array() {
704 print(arguments.callee.name);

Callers 1

Calls 3

encodeWtf16LEFunction · 0.70
pushMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected