diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/exec/strings.wast | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/lit/exec/strings.wast b/test/lit/exec/strings.wast index e7e31392a..711d2e36a 100644 --- a/test/lit/exec/strings.wast +++ b/test/lit/exec/strings.wast @@ -162,6 +162,29 @@ (string.const "hf") ) ) + + ;; CHECK: [fuzz-exec] calling get_codeunit + ;; CHECK-NEXT: [fuzz-exec] note result: get_codeunit => 99 + (func $get_codeunit (export "get_codeunit") (result i32) + ;; Reads 'c' which is code 99. + (stringview_wtf16.get_codeunit + (string.as_wtf16 + (string.const "abcdefg") + ) + (i32.const 2) + ) + ) + + ;; CHECK: [fuzz-exec] calling get_length + ;; CHECK-NEXT: [fuzz-exec] note result: get_length => 7 + (func $get_length (export "get_length") (result i32) + ;; This should return 7. + (stringview_wtf16.length + (string.as_wtf16 + (string.const "1234567") + ) + ) + ) ) ;; CHECK: [fuzz-exec] calling new_wtf16_array ;; CHECK-NEXT: [fuzz-exec] note result: new_wtf16_array => string("ello") @@ -213,6 +236,12 @@ ;; CHECK: [fuzz-exec] calling compare.10 ;; CHECK-NEXT: [fuzz-exec] note result: compare.10 => -1 + +;; CHECK: [fuzz-exec] calling get_codeunit +;; CHECK-NEXT: [fuzz-exec] note result: get_codeunit => 99 + +;; CHECK: [fuzz-exec] calling get_length +;; CHECK-NEXT: [fuzz-exec] note result: get_length => 7 ;; CHECK-NEXT: [fuzz-exec] comparing compare.1 ;; CHECK-NEXT: [fuzz-exec] comparing compare.10 ;; CHECK-NEXT: [fuzz-exec] comparing compare.2 @@ -229,4 +258,6 @@ ;; CHECK-NEXT: [fuzz-exec] comparing eq.3 ;; CHECK-NEXT: [fuzz-exec] comparing eq.4 ;; CHECK-NEXT: [fuzz-exec] comparing eq.5 +;; CHECK-NEXT: [fuzz-exec] comparing get_codeunit +;; CHECK-NEXT: [fuzz-exec] comparing get_length ;; CHECK-NEXT: [fuzz-exec] comparing new_wtf16_array |