mirror of
https://github.com/tc39/test262.git
synced 2025-05-04 06:50:32 +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
20 lines
562 B
JavaScript
20 lines
562 B
JavaScript
import Builder from '../Builder.js';
|
|
import * as assert from '../assert.js';
|
|
|
|
{
|
|
const builder = (new Builder())
|
|
.Type().End()
|
|
.Function().End()
|
|
.Export()
|
|
.Function("foo")
|
|
.Function("foo")
|
|
.End()
|
|
.Code()
|
|
.Function("foo", {params: [], ret: "void"})
|
|
.End()
|
|
.End();
|
|
|
|
const bin = builder.WebAssembly().get();
|
|
assert.throws(() => new WebAssembly.Module(bin), WebAssembly.CompileError, "WebAssembly.Module doesn't parse at byte 31: duplicate export: 'foo'");
|
|
}
|