Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions test/core/gc/type-subtyping.wast
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,12 @@
)
)
(assert_return (invoke "run"))
(assert_trap (invoke "fail1") "indirect call")
(assert_trap (invoke "fail2") "indirect call")
(assert_trap (invoke "fail3") "indirect call")
(assert_trap (invoke "fail4") "cast")
(assert_trap (invoke "fail5") "cast")
(assert_trap (invoke "fail6") "cast")
(assert_trap (invoke "fail1") "indirect call type mismatch")
(assert_trap (invoke "fail2") "indirect call type mismatch")
(assert_trap (invoke "fail3") "indirect call type mismatch")
(assert_trap (invoke "fail4") "cast failure")
(assert_trap (invoke "fail5") "cast failure")
(assert_trap (invoke "fail6") "cast failure")

(module
(type $t1 (sub (func)))
Expand All @@ -311,10 +311,10 @@
(drop)
)
)
(assert_trap (invoke "fail1") "indirect call")
(assert_trap (invoke "fail2") "indirect call")
(assert_trap (invoke "fail3") "cast")
(assert_trap (invoke "fail4") "cast")
(assert_trap (invoke "fail1") "indirect call type mismatch")
(assert_trap (invoke "fail2") "indirect call type mismatch")
(assert_trap (invoke "fail3") "cast failure")
(assert_trap (invoke "fail4") "cast failure")

(module
(type $t1 (sub (func)))
Expand Down Expand Up @@ -342,8 +342,8 @@
)
)
(assert_return (invoke "run"))
(assert_trap (invoke "fail1") "indirect call")
(assert_trap (invoke "fail2") "indirect call")
(assert_trap (invoke "fail1") "indirect call type mismatch")
(assert_trap (invoke "fail2") "indirect call type mismatch")

(module
(rec (type $f1 (sub (func))) (type (struct (field (ref $f1)))))
Expand Down Expand Up @@ -608,7 +608,7 @@
(rec (type $g1 (sub $f1 (func))) (type (struct)))
(func (import "M5" "g") (type $g1))
)
"incompatible import"
"incompatible import type"
)

(module
Expand Down Expand Up @@ -700,7 +700,7 @@
(rec (type $f11 (sub (func))) (type $f12 (sub $f11 (func))))
(func (import "M10" "f") (type $f11))
)
"incompatible import"
"incompatible import type"
)

(module
Expand All @@ -716,7 +716,7 @@
(rec (type $f11 (sub (func))) (type $f12 (sub $f01 (func))))
(func (import "M11" "f") (type $f11))
)
"incompatible import"
"incompatible import type"
)


Expand Down Expand Up @@ -829,63 +829,63 @@
(type $a (sub (array (ref none))))
(type $b (sub $a (array (ref any))))
)
"sub type 1 does not match super type"
"sub type"
)

(assert_invalid
(module
(type $a (sub (array (mut (ref any)))))
(type $b (sub $a (array (mut (ref none)))))
)
"sub type 1 does not match super type"
"sub type"
)

(assert_invalid
(module
(type $a (sub (array (mut (ref any)))))
(type $b (sub $a (array (ref any))))
)
"sub type 1 does not match super type"
"sub type"
)

(assert_invalid
(module
(type $a (sub (array (ref any))))
(type $b (sub $a (array (mut (ref any)))))
)
"sub type 1 does not match super type"
"sub type"
)

(assert_invalid
(module
(type $a (sub (struct (field (ref none)))))
(type $b (sub $a (struct (field (ref any)))))
)
"sub type 1 does not match super type"
"sub type"
)

(assert_invalid
(module
(type $a (sub (struct (field (mut (ref any))))))
(type $b (sub $a (struct (field (mut (ref none))))))
)
"sub type 1 does not match super type"
"sub type"
)

(assert_invalid
(module
(type $a (sub (struct (field (mut (ref any))))))
(type $b (sub $a (struct (field (ref any)))))
)
"sub type 1 does not match super type"
"sub type"
)

(assert_invalid
(module
(type $a (sub (struct (field (ref any)))))
(type $b (sub $a (struct (field (mut (ref any))))))
)
"sub type 1 does not match super type"
"sub type"
)

(assert_invalid
Expand Down