summaryrefslogtreecommitdiff
path: root/test/binaryen.js/sourcemap.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/binaryen.js/sourcemap.js')
-rw-r--r--test/binaryen.js/sourcemap.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/binaryen.js/sourcemap.js b/test/binaryen.js/sourcemap.js
index 62584ffd3..f3eb7229d 100644
--- a/test/binaryen.js/sourcemap.js
+++ b/test/binaryen.js/sourcemap.js
@@ -1,3 +1,7 @@
+function assert(x) {
+ if (!x) throw 'error!';
+}
+
var module = new Binaryen.Module();
var signature = module.addFunctionType("i", Binaryen.i32, []);
@@ -18,6 +22,7 @@ module.setDebugLocation(func, expr, fileIndex, 1, 2);
module.setDebugLocation(func, body, fileIndex, 0, 3);
var output = module.emitBinary("module.wasm.map");
+assert(module.validate());
function dumpBinary(buffer) {
var hex = [], o, b, h;