Update unit test cases (#4214)

* Update gc unit test cases
* Update aot stack frame unit test cases
This commit is contained in:
Zhenwei Jin
2025-04-25 14:43:24 +08:00
committed by GitHub
parent c883fafead
commit 6d61e72344
21 changed files with 237 additions and 277 deletions

View File

@ -11,75 +11,75 @@
(table 20 (ref null struct))
(func $init
(table.set (i32.const 0) (struct.new_canon_default $t0))
(table.set (i32.const 10) (struct.new_canon_default $t0))
(table.set (i32.const 1) (struct.new_canon_default $t1))
(table.set (i32.const 11) (struct.new_canon_default $t1'))
(table.set (i32.const 2) (struct.new_canon_default $t2))
(table.set (i32.const 12) (struct.new_canon_default $t2'))
(table.set (i32.const 3) (struct.new_canon_default $t3))
(table.set (i32.const 4) (struct.new_canon_default $t4))
(table.set (i32.const 0) (struct.new_default $t0))
(table.set (i32.const 10) (struct.new_default $t0))
(table.set (i32.const 1) (struct.new_default $t1))
(table.set (i32.const 11) (struct.new_default $t1'))
(table.set (i32.const 2) (struct.new_default $t2))
(table.set (i32.const 12) (struct.new_default $t2'))
(table.set (i32.const 3) (struct.new_default $t3))
(table.set (i32.const 4) (struct.new_default $t4))
)
(func (export "test-sub")
(call $init)
(drop (ref.cast null $t0 (ref.null struct)))
(drop (ref.cast null $t0 (table.get (i32.const 0))))
(drop (ref.cast null $t0 (table.get (i32.const 1))))
(drop (ref.cast null $t0 (table.get (i32.const 2))))
(drop (ref.cast null $t0 (table.get (i32.const 3))))
(drop (ref.cast null $t0 (table.get (i32.const 4))))
(drop (ref.cast (ref null $t0) (ref.null struct)))
(drop (ref.cast (ref null $t0) (table.get (i32.const 0))))
(drop (ref.cast (ref null $t0) (table.get (i32.const 1))))
(drop (ref.cast (ref null $t0) (table.get (i32.const 2))))
(drop (ref.cast (ref null $t0) (table.get (i32.const 3))))
(drop (ref.cast (ref null $t0) (table.get (i32.const 4))))
(drop (ref.cast null $t0 (ref.null struct)))
(drop (ref.cast null $t1 (table.get (i32.const 1))))
(drop (ref.cast null $t1 (table.get (i32.const 2))))
(drop (ref.cast (ref null $t0) (ref.null struct)))
(drop (ref.cast (ref null $t1) (table.get (i32.const 1))))
(drop (ref.cast (ref null $t1) (table.get (i32.const 2))))
(drop (ref.cast null $t0 (ref.null struct)))
(drop (ref.cast null $t2 (table.get (i32.const 2))))
(drop (ref.cast (ref null $t0) (ref.null struct)))
(drop (ref.cast (ref null $t2) (table.get (i32.const 2))))
(drop (ref.cast null $t0 (ref.null struct)))
(drop (ref.cast null $t3 (table.get (i32.const 3))))
(drop (ref.cast (ref null $t0) (ref.null struct)))
(drop (ref.cast (ref null $t3) (table.get (i32.const 3))))
(drop (ref.cast null $t4 (table.get (i32.const 4))))
(drop (ref.cast (ref null $t4) (table.get (i32.const 4))))
(drop (ref.cast $t0 (table.get (i32.const 0))))
(drop (ref.cast $t0 (table.get (i32.const 1))))
(drop (ref.cast $t0 (table.get (i32.const 2))))
(drop (ref.cast $t0 (table.get (i32.const 3))))
(drop (ref.cast $t0 (table.get (i32.const 4))))
(drop (ref.cast (ref $t0) (table.get (i32.const 0))))
(drop (ref.cast (ref $t0) (table.get (i32.const 1))))
(drop (ref.cast (ref $t0) (table.get (i32.const 2))))
(drop (ref.cast (ref $t0) (table.get (i32.const 3))))
(drop (ref.cast (ref $t0) (table.get (i32.const 4))))
(drop (ref.cast $t1 (table.get (i32.const 1))))
(drop (ref.cast $t1 (table.get (i32.const 2))))
(drop (ref.cast (ref $t1) (table.get (i32.const 1))))
(drop (ref.cast (ref $t1) (table.get (i32.const 2))))
(drop (ref.cast $t2 (table.get (i32.const 2))))
(drop (ref.cast (ref $t2) (table.get (i32.const 2))))
(drop (ref.cast $t3 (table.get (i32.const 3))))
(drop (ref.cast (ref $t3) (table.get (i32.const 3))))
(drop (ref.cast $t4 (table.get (i32.const 4))))
(drop (ref.cast (ref $t4) (table.get (i32.const 4))))
)
(func (export "test-canon")
(call $init)
(drop (ref.cast $t0 (table.get (i32.const 0))))
(drop (ref.cast $t0 (table.get (i32.const 1))))
(drop (ref.cast $t0 (table.get (i32.const 2))))
(drop (ref.cast $t0 (table.get (i32.const 3))))
(drop (ref.cast $t0 (table.get (i32.const 4))))
(drop (ref.cast (ref $t0) (table.get (i32.const 0))))
(drop (ref.cast (ref $t0) (table.get (i32.const 1))))
(drop (ref.cast (ref $t0) (table.get (i32.const 2))))
(drop (ref.cast (ref $t0) (table.get (i32.const 3))))
(drop (ref.cast (ref $t0) (table.get (i32.const 4))))
(drop (ref.cast $t0 (table.get (i32.const 10))))
(drop (ref.cast $t0 (table.get (i32.const 11))))
(drop (ref.cast $t0 (table.get (i32.const 12))))
(drop (ref.cast (ref $t0) (table.get (i32.const 10))))
(drop (ref.cast (ref $t0) (table.get (i32.const 11))))
(drop (ref.cast (ref $t0) (table.get (i32.const 12))))
(drop (ref.cast $t1' (table.get (i32.const 1))))
(drop (ref.cast $t1' (table.get (i32.const 2))))
(drop (ref.cast (ref $t1') (table.get (i32.const 1))))
(drop (ref.cast (ref $t1') (table.get (i32.const 2))))
(drop (ref.cast $t1 (table.get (i32.const 11))))
(drop (ref.cast $t1 (table.get (i32.const 12))))
(drop (ref.cast (ref $t1) (table.get (i32.const 11))))
(drop (ref.cast (ref $t1) (table.get (i32.const 12))))
(drop (ref.cast $t2' (table.get (i32.const 2))))
(drop (ref.cast (ref $t2') (table.get (i32.const 2))))
(drop (ref.cast $t2 (table.get (i32.const 12))))
(drop (ref.cast (ref $t2) (table.get (i32.const 12))))
)
)