TestUserdefExpr

This commit is contained in:
xushiwei
2024-06-01 17:30:37 +08:00
parent bfe68520f4
commit e151bd4cd1

View File

@@ -126,7 +126,9 @@ func TestCvtType(t *testing.T) {
func TestUserdefExpr(t *testing.T) { func TestUserdefExpr(t *testing.T) {
c := &pyVarTy{} c := &pyVarTy{}
b := &builtinTy{}
_ = c.String() _ = c.String()
_ = b.String()
test := func(a types.Type) { test := func(a types.Type) {
defer func() { defer func() {
if r := recover(); r == nil { if r := recover(); r == nil {
@@ -136,6 +138,7 @@ func TestUserdefExpr(t *testing.T) {
a.Underlying() a.Underlying()
} }
test(c) test(c)
test(b)
} }
func TestAny(t *testing.T) { func TestAny(t *testing.T) {