diff options
author | Thomas Lively <tlively@google.com> | 2024-03-22 14:55:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 21:55:05 +0000 |
commit | 509eaa21221b47789241d94e4b39d01e07b01488 (patch) | |
tree | ae7a9986d2c9ed7bdc54a698e5023935bf490a5a /test/lit/passes/precompute-strings.wast | |
parent | cab11d37f7297dad6afd72522e8299e3d8480220 (diff) | |
download | binaryen-509eaa21221b47789241d94e4b39d01e07b01488.tar.gz binaryen-509eaa21221b47789241d94e4b39d01e07b01488.tar.bz2 binaryen-509eaa21221b47789241d94e4b39d01e07b01488.zip |
Add missing conversions in string slice tests (#6424)
Our validator apparently does not catch this type issue yet. For now just fix
the tests.
Diffstat (limited to 'test/lit/passes/precompute-strings.wast')
-rw-r--r-- | test/lit/passes/precompute-strings.wast | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/lit/passes/precompute-strings.wast b/test/lit/passes/precompute-strings.wast index 197e62c7a..74ca4d145 100644 --- a/test/lit/passes/precompute-strings.wast +++ b/test/lit/passes/precompute-strings.wast @@ -216,7 +216,9 @@ (func $slice (export "slice") (result (ref string)) ;; Slicing [3:6] here should definitely output "def". (stringview_wtf16.slice - (string.const "abcdefgh") + (string.as_wtf16 + (string.const "abcdefgh") + ) (i32.const 3) (i32.const 6) ) @@ -224,7 +226,9 @@ ;; CHECK: (func $slice-bad (type $2) (result (ref string)) ;; CHECK-NEXT: (stringview_wtf16.slice - ;; CHECK-NEXT: (string.const "abcd\c2\a3fgh") + ;; CHECK-NEXT: (string.as_wtf16 + ;; CHECK-NEXT: (string.const "abcd\c2\a3fgh") + ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 3) ;; CHECK-NEXT: (i32.const 6) ;; CHECK-NEXT: ) @@ -233,7 +237,9 @@ ;; This slice contains non-ascii, so we do not optimize. (stringview_wtf16.slice ;; abcd£fgh - (string.const "abcd\C2\A3fgh") + (string.as_wtf16 + (string.const "abcd\C2\A3fgh") + ) (i32.const 3) (i32.const 6) ) |