summaryrefslogtreecommitdiff
path: root/test/lit/exec/strings.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/exec/strings.wast')
-rw-r--r--test/lit/exec/strings.wast36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/lit/exec/strings.wast b/test/lit/exec/strings.wast
new file mode 100644
index 000000000..2852337c8
--- /dev/null
+++ b/test/lit/exec/strings.wast
@@ -0,0 +1,36 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.
+
+;; RUN: wasm-opt %s -all --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s
+
+(module
+ (type $array16 (array (mut i16)))
+
+ ;; CHECK: [fuzz-exec] calling new_wtf16_array
+ ;; CHECK-NEXT: [fuzz-exec] note result: new_wtf16_array => string("ello")
+ (func "new_wtf16_array" (result stringref)
+ (string.new_wtf16_array
+ (array.init_static $array16
+ (i32.const 104) ;; h
+ (i32.const 101) ;; e
+ (i32.const 108) ;; l
+ (i32.const 108) ;; l
+ (i32.const 111) ;; o
+ )
+ (i32.const 1) ;; start from index 1, to chop off the 'h'
+ (i32.const 5)
+ )
+ )
+
+ ;; CHECK: [fuzz-exec] calling const
+ ;; CHECK-NEXT: [fuzz-exec] note result: const => string("world")
+ (func "const" (result stringref)
+ (string.const "world")
+ )
+)
+;; CHECK: [fuzz-exec] calling new_wtf16_array
+;; CHECK-NEXT: [fuzz-exec] note result: new_wtf16_array => string("ello")
+
+;; CHECK: [fuzz-exec] calling const
+;; CHECK-NEXT: [fuzz-exec] note result: const => string("world")
+;; CHECK-NEXT: [fuzz-exec] comparing const
+;; CHECK-NEXT: [fuzz-exec] comparing new_wtf16_array