summaryrefslogtreecommitdiff
path: root/test/binaryen.js/debug-info.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/binaryen.js/debug-info.js')
-rw-r--r--test/binaryen.js/debug-info.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/binaryen.js/debug-info.js b/test/binaryen.js/debug-info.js
index ea7dd4fa4..d1634f10e 100644
--- a/test/binaryen.js/debug-info.js
+++ b/test/binaryen.js/debug-info.js
@@ -1,3 +1,7 @@
+function assert(x) {
+ if (!x) throw 'error!';
+}
+
var wast = `
(module
(type $v (func))
@@ -15,6 +19,7 @@ var binary = module.emitBinary();
module.dispose();
module = Binaryen.readBinary(binary);
console.log(module.emitText());
+assert(module.validate());
module.dispose();
// With debug info
@@ -26,6 +31,7 @@ binary = module.emitBinary();
module.dispose();
module = Binaryen.readBinary(binary);
console.log(module.emitText());
+assert(module.validate());
module.dispose();
// Without debug info
@@ -37,4 +43,5 @@ binary = module.emitBinary();
module.dispose();
module = Binaryen.readBinary(binary);
console.log(module.emitText());
+assert(module.validate());
module.dispose();