Skip to content

Commit f92667e

Browse files
authored
[test] Unify error messages in gc/type-subtyping (#2019)
1 parent acb9202 commit f92667e

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

test/core/gc/type-subtyping.wast

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,12 @@
280280
)
281281
)
282282
(assert_return (invoke "run"))
283-
(assert_trap (invoke "fail1") "indirect call")
284-
(assert_trap (invoke "fail2") "indirect call")
285-
(assert_trap (invoke "fail3") "indirect call")
286-
(assert_trap (invoke "fail4") "cast")
287-
(assert_trap (invoke "fail5") "cast")
288-
(assert_trap (invoke "fail6") "cast")
283+
(assert_trap (invoke "fail1") "indirect call type mismatch")
284+
(assert_trap (invoke "fail2") "indirect call type mismatch")
285+
(assert_trap (invoke "fail3") "indirect call type mismatch")
286+
(assert_trap (invoke "fail4") "cast failure")
287+
(assert_trap (invoke "fail5") "cast failure")
288+
(assert_trap (invoke "fail6") "cast failure")
289289

290290
(module
291291
(type $t1 (sub (func)))
@@ -311,10 +311,10 @@
311311
(drop)
312312
)
313313
)
314-
(assert_trap (invoke "fail1") "indirect call")
315-
(assert_trap (invoke "fail2") "indirect call")
316-
(assert_trap (invoke "fail3") "cast")
317-
(assert_trap (invoke "fail4") "cast")
314+
(assert_trap (invoke "fail1") "indirect call type mismatch")
315+
(assert_trap (invoke "fail2") "indirect call type mismatch")
316+
(assert_trap (invoke "fail3") "cast failure")
317+
(assert_trap (invoke "fail4") "cast failure")
318318

319319
(module
320320
(type $t1 (sub (func)))
@@ -342,8 +342,8 @@
342342
)
343343
)
344344
(assert_return (invoke "run"))
345-
(assert_trap (invoke "fail1") "indirect call")
346-
(assert_trap (invoke "fail2") "indirect call")
345+
(assert_trap (invoke "fail1") "indirect call type mismatch")
346+
(assert_trap (invoke "fail2") "indirect call type mismatch")
347347

348348
(module
349349
(rec (type $f1 (sub (func))) (type (struct (field (ref $f1)))))
@@ -608,7 +608,7 @@
608608
(rec (type $g1 (sub $f1 (func))) (type (struct)))
609609
(func (import "M5" "g") (type $g1))
610610
)
611-
"incompatible import"
611+
"incompatible import type"
612612
)
613613

614614
(module
@@ -700,7 +700,7 @@
700700
(rec (type $f11 (sub (func))) (type $f12 (sub $f11 (func))))
701701
(func (import "M10" "f") (type $f11))
702702
)
703-
"incompatible import"
703+
"incompatible import type"
704704
)
705705

706706
(module
@@ -716,7 +716,7 @@
716716
(rec (type $f11 (sub (func))) (type $f12 (sub $f01 (func))))
717717
(func (import "M11" "f") (type $f11))
718718
)
719-
"incompatible import"
719+
"incompatible import type"
720720
)
721721

722722

@@ -829,63 +829,63 @@
829829
(type $a (sub (array (ref none))))
830830
(type $b (sub $a (array (ref any))))
831831
)
832-
"sub type 1 does not match super type"
832+
"sub type"
833833
)
834834

835835
(assert_invalid
836836
(module
837837
(type $a (sub (array (mut (ref any)))))
838838
(type $b (sub $a (array (mut (ref none)))))
839839
)
840-
"sub type 1 does not match super type"
840+
"sub type"
841841
)
842842

843843
(assert_invalid
844844
(module
845845
(type $a (sub (array (mut (ref any)))))
846846
(type $b (sub $a (array (ref any))))
847847
)
848-
"sub type 1 does not match super type"
848+
"sub type"
849849
)
850850

851851
(assert_invalid
852852
(module
853853
(type $a (sub (array (ref any))))
854854
(type $b (sub $a (array (mut (ref any)))))
855855
)
856-
"sub type 1 does not match super type"
856+
"sub type"
857857
)
858858

859859
(assert_invalid
860860
(module
861861
(type $a (sub (struct (field (ref none)))))
862862
(type $b (sub $a (struct (field (ref any)))))
863863
)
864-
"sub type 1 does not match super type"
864+
"sub type"
865865
)
866866

867867
(assert_invalid
868868
(module
869869
(type $a (sub (struct (field (mut (ref any))))))
870870
(type $b (sub $a (struct (field (mut (ref none))))))
871871
)
872-
"sub type 1 does not match super type"
872+
"sub type"
873873
)
874874

875875
(assert_invalid
876876
(module
877877
(type $a (sub (struct (field (mut (ref any))))))
878878
(type $b (sub $a (struct (field (ref any)))))
879879
)
880-
"sub type 1 does not match super type"
880+
"sub type"
881881
)
882882

883883
(assert_invalid
884884
(module
885885
(type $a (sub (struct (field (ref any)))))
886886
(type $b (sub $a (struct (field (mut (ref any))))))
887887
)
888-
"sub type 1 does not match super type"
888+
"sub type"
889889
)
890890

891891
(assert_invalid

0 commit comments

Comments
 (0)