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