summaryrefslogtreecommitdiff
path: root/test/binaryen.js/debug-names.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/binaryen.js/debug-names.js')
-rw-r--r--test/binaryen.js/debug-names.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/binaryen.js/debug-names.js b/test/binaryen.js/debug-names.js
index 539b119aa..0be6bf365 100644
--- a/test/binaryen.js/debug-names.js
+++ b/test/binaryen.js/debug-names.js
@@ -1,13 +1,13 @@
var wast = `
-(module $hello
- (global $world i32 (i32.const 0))
+(module $hel
+ (memory $lo 0 0)
+ (table $wor 0 0 funcref)
+ (global $ld i32 (i32.const 0))
(func $of (param $wasm i32)
(local $!#$%&'*+-./:<=>?@\\^_\`|~ f64)
)
)
`;
-// Note that global names are not yet covered by the name section, so it is
-// expected that the global's name is lost after roundtripping.
console.log("=== input wast ===" + wast);
@@ -33,4 +33,10 @@ module.dispose();
console.log("=== roundtripped ===\n" + module2.emitText());
+var module3 = binaryen.readBinary(module2.emitBinary());
+
module2.dispose();
+
+console.log("=== roundtripped again ===\n" + module3.emitText());
+
+module3.dispose();