Skip to content

Commit 509eaa2

Browse files
authored
Add missing conversions in string slice tests (#6424)
Our validator apparently does not catch this type issue yet. For now just fix the tests.
1 parent cab11d3 commit 509eaa2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/lit/passes/precompute-strings.wast

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,15 +216,19 @@
216216
(func $slice (export "slice") (result (ref string))
217217
;; Slicing [3:6] here should definitely output "def".
218218
(stringview_wtf16.slice
219-
(string.const "abcdefgh")
219+
(string.as_wtf16
220+
(string.const "abcdefgh")
221+
)
220222
(i32.const 3)
221223
(i32.const 6)
222224
)
223225
)
224226

225227
;; CHECK: (func $slice-bad (type $2) (result (ref string))
226228
;; CHECK-NEXT: (stringview_wtf16.slice
227-
;; CHECK-NEXT: (string.const "abcd\c2\a3fgh")
229+
;; CHECK-NEXT: (string.as_wtf16
230+
;; CHECK-NEXT: (string.const "abcd\c2\a3fgh")
231+
;; CHECK-NEXT: )
228232
;; CHECK-NEXT: (i32.const 3)
229233
;; CHECK-NEXT: (i32.const 6)
230234
;; CHECK-NEXT: )
@@ -233,7 +237,9 @@
233237
;; This slice contains non-ascii, so we do not optimize.
234238
(stringview_wtf16.slice
235239
;; abcd£fgh
236-
(string.const "abcd\C2\A3fgh")
240+
(string.as_wtf16
241+
(string.const "abcd\C2\A3fgh")
242+
)
237243
(i32.const 3)
238244
(i32.const 6)
239245
)

0 commit comments

Comments
 (0)