diff options
author | Alon Zakai <azakai@google.com> | 2022-07-08 08:32:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 08:32:59 -0700 |
commit | b88bedb16c8177442916eb64ebb4886206aeccf0 (patch) | |
tree | d2c037ce0b59b9a1362c349a61dc3b31a3bfe27e /test | |
parent | 19a437500a4c30f48355722653a01a8c44ff6bec (diff) | |
download | binaryen-b88bedb16c8177442916eb64ebb4886206aeccf0.tar.gz binaryen-b88bedb16c8177442916eb64ebb4886206aeccf0.tar.bz2 binaryen-b88bedb16c8177442916eb64ebb4886206aeccf0.zip |
[Strings] string.concat (#4777)
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/strings.wast | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/lit/strings.wast b/test/lit/strings.wast index 5afdfdbcb..64974d005 100644 --- a/test/lit/strings.wast +++ b/test/lit/strings.wast @@ -11,6 +11,8 @@ ;; CHECK: (type $none_=>_none (func)) + ;; CHECK: (type $ref?|string|_ref?|string|_=>_none (func (param stringref stringref))) + ;; CHECK: (global $string-const stringref (string.const "string in a global")) (global $string-const stringref (string.const "string in a global")) @@ -185,4 +187,21 @@ ) ) ) + + ;; CHECK: (func $string.concat (param $a stringref) (param $b stringref) + ;; CHECK-NEXT: (local.set $a + ;; CHECK-NEXT: (string.concat + ;; CHECK-NEXT: (local.get $a) + ;; CHECK-NEXT: (local.get $b) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $string.concat (param $a stringref) (param $b stringref) + (local.set $a ;; validate the output is a stringref + (string.concat + (local.get $a) + (local.get $b) + ) + ) + ) ) |