summaryrefslogtreecommitdiff
path: root/test/lit/exec/strings.wast
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-03-19 12:30:41 -0700
committerGitHub <noreply@github.com>2024-03-19 12:30:41 -0700
commit70f860e7b11b013efd5af4bb5c14b72d2183a45a (patch)
tree4be86cf3dafc56882cb16d199c12df8f668698b8 /test/lit/exec/strings.wast
parent84cc9fa123e58c5ff236145a24157c098daede64 (diff)
downloadbinaryen-70f860e7b11b013efd5af4bb5c14b72d2183a45a.tar.gz
binaryen-70f860e7b11b013efd5af4bb5c14b72d2183a45a.tar.bz2
binaryen-70f860e7b11b013efd5af4bb5c14b72d2183a45a.zip
[Strings] Implement stringview_wtf16.slice (#6404)
Diffstat (limited to 'test/lit/exec/strings.wast')
-rw-r--r--test/lit/exec/strings.wast15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lit/exec/strings.wast b/test/lit/exec/strings.wast
index 706602b1c..5ff8ce47a 100644
--- a/test/lit/exec/strings.wast
+++ b/test/lit/exec/strings.wast
@@ -244,6 +244,17 @@
)
)
)
+
+ ;; CHECK: [fuzz-exec] calling slice
+ ;; CHECK-NEXT: [fuzz-exec] note result: slice => string("def")
+ (func $slice (export "slice") (result (ref string))
+ ;; Slicing [3:6] here should definitely output "def".
+ (stringview_wtf16.slice
+ (string.const "abcdefgh")
+ (i32.const 3)
+ (i32.const 6)
+ )
+ )
)
;; CHECK: [fuzz-exec] calling new_wtf16_array
;; CHECK-NEXT: [fuzz-exec] note result: new_wtf16_array => string("ello")
@@ -309,6 +320,9 @@
;; CHECK-NEXT: [LoggingExternalInterface logging 98]
;; CHECK-NEXT: [LoggingExternalInterface logging 99]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
+
+;; CHECK: [fuzz-exec] calling slice
+;; CHECK-NEXT: [fuzz-exec] note result: slice => string("def")
;; CHECK-NEXT: [fuzz-exec] comparing compare.1
;; CHECK-NEXT: [fuzz-exec] comparing compare.10
;; CHECK-NEXT: [fuzz-exec] comparing compare.2
@@ -329,3 +343,4 @@
;; CHECK-NEXT: [fuzz-exec] comparing get_codeunit
;; CHECK-NEXT: [fuzz-exec] comparing get_length
;; CHECK-NEXT: [fuzz-exec] comparing new_wtf16_array
+;; CHECK-NEXT: [fuzz-exec] comparing slice