mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-28 22:21:50 +00:00
More options for asc
This commit is contained in:
13
tests/binaryen/export-import.js
Normal file
13
tests/binaryen/export-import.js
Normal file
@ -0,0 +1,13 @@
|
||||
var binaryen = require("binaryen");
|
||||
|
||||
// "unexpected false: module function exports must be found"
|
||||
|
||||
var mod = new binaryen.Module();
|
||||
|
||||
var funcType = mod.addFunctionType("v", binaryen.none, []);
|
||||
var func = mod.addImport("test", "env", "test", funcType);
|
||||
mod.addExport("test", "test");
|
||||
|
||||
console.log(mod.emitText());
|
||||
if (!mod.validate())
|
||||
console.log("-> does not validate");
|
Reference in New Issue
Block a user