diff options
Diffstat (limited to 'test/binaryen.js/custom-section.js')
-rw-r--r-- | test/binaryen.js/custom-section.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/binaryen.js/custom-section.js b/test/binaryen.js/custom-section.js new file mode 100644 index 000000000..f61af0096 --- /dev/null +++ b/test/binaryen.js/custom-section.js @@ -0,0 +1,11 @@ +function assert(x) { + if (!x) throw 'error!'; +} + +Binaryen.setAPITracing(true); +var module = new Binaryen.Module(); + +module.addCustomSection("hello", [119, 111, 114, 108, 100]); + +assert(module.validate()); +console.log(module.emitText()); |