blob: 4d10e8c15d0e1d77946d87cee8d20f7220d9d24f [file] [log] [blame]
import * as assert from '../assert.js';
import * as utilities from '../utilities.js';
for (let version = 0; version < 256; ++version) {
if (version === 1)
continue;
const emptyModuleArray = Uint8Array.of(0x0, 0x61, 0x73, 0x6d, version, 0x00, 0x00, 0x00);
assert.throws(() => new WebAssembly.Module(emptyModuleArray), WebAssembly.CompileError, `WebAssembly.Module doesn't parse at byte 0: unexpected version number ${version} expected 1`);
}