summaryrefslogtreecommitdiff
path: root/test/lit/table-operations.wast
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2021-10-09 05:26:08 +0300
committerGitHub <noreply@github.com>2021-10-08 19:26:08 -0700
commitef686a4d932b9b86edc34a3b9b15926f943f6f7b (patch)
tree38a89d5b555d4501b7d504a66c7aec409e45e9b1 /test/lit/table-operations.wast
parent53c5e3e62db25fe3522a1fa615a1f53c4cefdf06 (diff)
downloadbinaryen-ef686a4d932b9b86edc34a3b9b15926f943f6f7b.tar.gz
binaryen-ef686a4d932b9b86edc34a3b9b15926f943f6f7b.tar.bz2
binaryen-ef686a4d932b9b86edc34a3b9b15926f943f6f7b.zip
Add table.size operation (#4224)
Diffstat (limited to 'test/lit/table-operations.wast')
-rw-r--r--test/lit/table-operations.wast20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lit/table-operations.wast b/test/lit/table-operations.wast
index 555708c07..dece2143a 100644
--- a/test/lit/table-operations.wast
+++ b/test/lit/table-operations.wast
@@ -12,9 +12,13 @@
(module
;; CHECK-BINARY: (type $none_=>_none (func))
+ ;; CHECK-BINARY: (type $none_=>_i32 (func (result i32)))
+
;; CHECK-BINARY: (table $table-1 1 1 funcref)
;; CHECK-TEXT: (type $none_=>_none (func))
+ ;; CHECK-TEXT: (type $none_=>_i32 (func (result i32)))
+
;; CHECK-TEXT: (table $table-1 1 1 funcref)
(table $table-1 funcref
(elem $foo)
@@ -113,9 +117,21 @@
)
)
)
+
+ ;; CHECK-BINARY: (func $get-table-size (result i32)
+ ;; CHECK-BINARY-NEXT: (table.size $table-1)
+ ;; CHECK-BINARY-NEXT: )
+ ;; CHECK-TEXT: (func $get-table-size (result i32)
+ ;; CHECK-TEXT-NEXT: (table.size $table-1)
+ ;; CHECK-TEXT-NEXT: )
+ (func $get-table-size (result i32)
+ (table.size $table-1)
+ )
)
;; CHECK-NODEBUG: (type $none_=>_none (func))
+;; CHECK-NODEBUG: (type $none_=>_i32 (func (result i32)))
+
;; CHECK-NODEBUG: (table $0 1 1 funcref)
;; CHECK-NODEBUG: (table $1 3 3 funcref)
@@ -152,3 +168,7 @@
;; CHECK-NODEBUG-NEXT: )
;; CHECK-NODEBUG-NEXT: )
;; CHECK-NODEBUG-NEXT: )
+
+;; CHECK-NODEBUG: (func $3 (result i32)
+;; CHECK-NODEBUG-NEXT: (table.size $0)
+;; CHECK-NODEBUG-NEXT: )