src/reflect: uncomment more tests that pass

This commit is contained in:
Damian Gryski
2024-05-28 10:40:42 -07:00
committed by Damian Gryski
parent c383a407e3
commit b6fd0c818e
+9 -18
View File
@@ -698,8 +698,6 @@ func TestMapSetNil(t *testing.T) {
}
}
/*
func TestAll(t *testing.T) {
testType(t, 1, TypeOf((int8)(0)), "int8")
testType(t, 2, TypeOf((*int8)(nil)).Elem(), "int8")
@@ -747,8 +745,6 @@ func TestAll(t *testing.T) {
testType(t, 14, typ, "[]uint32")
}
*/
func TestInterfaceGet(t *testing.T) {
var inter struct {
E any
@@ -1272,8 +1268,6 @@ func TestDeepEqualUnexportedMap(t *testing.T) {
}
}
/*
var deepEqualPerfTests = []struct {
x, y any
}{
@@ -1339,8 +1333,6 @@ func TestDeepEqualAllocs(t *testing.T) {
}
}
*/
func check2ndField(x any, offs uintptr, t *testing.T) {
s := ValueOf(x)
f := s.Type().Field(1)
@@ -1600,7 +1592,8 @@ func TestIsZero(t *testing.T) {
*/
}
/*
// extra comment for gofmt
func TestInterfaceExtraction(t *testing.T) {
var s struct {
W io.Writer
@@ -1612,9 +1605,6 @@ func TestInterfaceExtraction(t *testing.T) {
t.Error("Interface() on interface: ", v, s.W)
}
}
*/
func TestNilPtrValueSub(t *testing.T) {
var pi *int
if pv := ValueOf(pi); pv.Elem().IsValid() {
@@ -3368,6 +3358,8 @@ func TestNestedMethods(t *testing.T) {
}
}
*/
type unexp struct{}
func (*unexp) f() (int32, int8) { return 7, 7 }
@@ -3379,8 +3371,6 @@ type unexpI interface {
var unexpi unexpI = new(unexp)
/*
func TestUnexportedMethods(t *testing.T) {
typ := TypeOf(unexpi)
@@ -3389,8 +3379,6 @@ func TestUnexportedMethods(t *testing.T) {
}
}
*/
type InnerInt struct {
X int
}
@@ -3432,6 +3420,8 @@ func TestEmbeddedMethods(t *testing.T) {
}
}
*/
type FuncDDD func(...any) error
func (f FuncDDD) M() {}
@@ -3443,6 +3433,7 @@ func TestNumMethodOnDDD(t *testing.T) {
}
}
/*
func TestPtrTo(t *testing.T) {
// This block of code means that the ptrToThis field of the
// reflect data for *unsafe.Pointer is non zero, see
@@ -3489,6 +3480,8 @@ func TestPtrToGC(t *testing.T) {
}
}
*/
func TestAddr(t *testing.T) {
var p struct {
X, Y int
@@ -3591,8 +3584,6 @@ func TestAllocations(t *testing.T) {
})
}
*/
func TestSmallNegativeInt(t *testing.T) {
i := int16(-1)
v := ValueOf(i)