mirror of
https://github.com/tc39/test262.git
synced 2025-05-04 15:00:42 +02:00
* [javascriptcore-test262-automation] Changes from https://github.com/webkit/webkit.git at sha 8a25978f29 on Tue Aug 28 2018 18:16:05 GMT+0000 (Coordinated Universal Time) * [javascriptcore-test262-automation] Updated curation log with latest revision sha's from export and changed files. sourceRevisionAtLastExport: 8a25978f29 targetRevisionAtLastExport: 70dc33467
19 lines
433 B
JavaScript
19 lines
433 B
JavaScript
import * as assert from '../assert.js';
|
|
|
|
var data = read("./nameSection.wasm", "binary");
|
|
|
|
function check(step)
|
|
{
|
|
var parser = $vm.createWasmStreamingParser();
|
|
for (var i = 0; i < data.byteLength; i += step) {
|
|
parser.addBytes(data.subarray(i, i + Math.min(step, data.byteLength - i)));
|
|
}
|
|
assert.eq(parser.finalize(), 7);
|
|
}
|
|
|
|
for (var i = 0; i < 10; ++i)
|
|
check(i + 1);
|
|
check(100);
|
|
check(1000);
|
|
check(2000);
|