blob: a9cc3ba19e51510f43095d84582c77331a97b364 [file] [log] [blame]
import * as table from "./table.wasm"
import * as assert from '../assert.js';
assert.instanceof(table.table, WebAssembly.Table);
assert.eq(table.table.length, 3);
assert.isFunction(table.table.get(0));
assert.isFunction(table.table.get(1));
assert.eq(table.table.get(2), null);
assert.eq(table.table.get(0)(), 42);
assert.eq(table.table.get(1)(), 83);
assert.throws(() => {
table.table = 32;
}, TypeError, `Attempted to assign to readonly property.`);