blob: cca52f1cea19bfb3b0ac35ddeb8393e79019845c [file] [log] [blame]
import { instantiate } from "../wabt-wrapper.js";
import * as assert from "../assert.js";
let wat = `
(module
(memory $mem0 1)
(func (export "test") (param $sz i32) (result i32)
(local.get $sz)
)
)
`;
async function test() {
const instance = await instantiate(wat, {}, {reference_types: true});
const {test} = instance.exports;
assert.eq(test(42), 42);
}
assert.asyncTest(test());