blob: 2b96999753d3a4ad086a0ece5898284f8fcb8b70 [file] [log] [blame]
import Builder from '../Builder.js'
import * as assert from '../assert.js'
{
const b = new Builder();
b.Type().End()
.Function().End()
.Exception().Signature({ params: ["i32"]}).End()
.Export().Exception("foo", 0).End()
const bin = b.WebAssembly().get();
const module = new WebAssembly.Module(bin);
const instance = new WebAssembly.Instance(module);
assert.instanceof(instance.exports.foo, WebAssembly.Tag);
}