summaryrefslogtreecommitdiff
path: root/test/lit/passes/string-lowering-imports.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/passes/string-lowering-imports.wast')
-rw-r--r--test/lit/passes/string-lowering-imports.wast26
1 files changed, 16 insertions, 10 deletions
diff --git a/test/lit/passes/string-lowering-imports.wast b/test/lit/passes/string-lowering-imports.wast
index 6a908139e..1c6d62be7 100644
--- a/test/lit/passes/string-lowering-imports.wast
+++ b/test/lit/passes/string-lowering-imports.wast
@@ -1,38 +1,44 @@
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
;; RUN: wasm-opt %s -all --string-lowering-magic-imports --remove-unused-module-elements -S -o - | filecheck %s
+
+;; Text round tripping
+;; RUN: wasm-opt %s -all --string-lowering-magic-imports --remove-unused-module-elements -S -o - | wasm-opt -all -S -o - | filecheck %s
+
+;; Binary round tripping
;; RUN: wasm-opt %s -all --string-lowering-magic-imports --remove-unused-module-elements --roundtrip -S -o - | filecheck %s --check-prefix=RTRIP
+
(module
;; CHECK: (type $0 (func))
- ;; CHECK: (import "\'" "bar" (global $string.const_bar (ref extern)))
+ ;; CHECK: (import "\'" "bar" (global $"string.const_\"bar\"" (ref extern)))
- ;; CHECK: (import "\'" "foo" (global $string.const_foo (ref extern)))
+ ;; CHECK: (import "\'" "foo" (global $"string.const_\"foo\"" (ref extern)))
- ;; CHECK: (import "\'" "needs\tescaping\00.\'#%- .\r\n\\08\0c\n\r\t.\ea\99\ae" (global $"string.const_needs\tescaping\00.\'#%- .\r\n\\08\0c\n\r\t.\ea\99\ae" (ref extern)))
+ ;; CHECK: (import "\'" "needs\tescaping\00.\'#%- .\r\n\\08\0c\n\r\t.\ea\99\ae" (global $"string.const_\"needs\\tescaping\\00.\\\'#%- .\\r\\n\\\\08\\0c\\n\\r\\t.\\ea\\99\\ae\"" (ref extern)))
- ;; CHECK: (import "string.const" "0" (global $"string.const_unpaired high surrogate \ed\a0\80 " (ref extern)))
+ ;; CHECK: (import "string.const" "0" (global $"string.const_\"unpaired high surrogate \\ed\\a0\\80 \"" (ref extern)))
- ;; CHECK: (import "string.const" "1" (global $"string.const_unpaired low surrogate \ed\bd\88 " (ref extern)))
+ ;; CHECK: (import "string.const" "1" (global $"string.const_\"unpaired low surrogate \\ed\\bd\\88 \"" (ref extern)))
;; CHECK: (export "consts" (func $consts))
;; CHECK: (func $consts (type $0)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (global.get $string.const_foo)
+ ;; CHECK-NEXT: (global.get $"string.const_\"foo\"")
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (global.get $string.const_bar)
+ ;; CHECK-NEXT: (global.get $"string.const_\"bar\"")
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (global.get $"string.const_needs\tescaping\00.\'#%- .\r\n\\08\0c\n\r\t.\ea\99\ae")
+ ;; CHECK-NEXT: (global.get $"string.const_\"needs\\tescaping\\00.\\\'#%- .\\r\\n\\\\08\\0c\\n\\r\\t.\\ea\\99\\ae\"")
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (global.get $"string.const_unpaired high surrogate \ed\a0\80 ")
+ ;; CHECK-NEXT: (global.get $"string.const_\"unpaired high surrogate \\ed\\a0\\80 \"")
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (global.get $"string.const_unpaired low surrogate \ed\bd\88 ")
+ ;; CHECK-NEXT: (global.get $"string.const_\"unpaired low surrogate \\ed\\bd\\88 \"")
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; RTRIP: (type $0 (func))