Skip to content

Commit

Permalink
src/reflect: uncomment more tests that pass
Browse files Browse the repository at this point in the history
  • Loading branch information
dgryski committed May 29, 2024
1 parent c383a40 commit b6fd0c8
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions src/reflect/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -747,8 +745,6 @@ func TestAll(t *testing.T) {
testType(t, 14, typ, "[]uint32")
}

*/

func TestInterfaceGet(t *testing.T) {
var inter struct {
E any
Expand Down Expand Up @@ -1272,8 +1268,6 @@ func TestDeepEqualUnexportedMap(t *testing.T) {
}
}

/*
var deepEqualPerfTests = []struct {
x, y any
}{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -1600,7 +1592,8 @@ func TestIsZero(t *testing.T) {
*/
}

/*
// extra comment for gofmt

func TestInterfaceExtraction(t *testing.T) {
var s struct {
W io.Writer
Expand All @@ -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() {
Expand Down Expand Up @@ -3368,6 +3358,8 @@ func TestNestedMethods(t *testing.T) {
}
}
*/

type unexp struct{}

func (*unexp) f() (int32, int8) { return 7, 7 }
Expand All @@ -3379,8 +3371,6 @@ type unexpI interface {

var unexpi unexpI = new(unexp)

/*
func TestUnexportedMethods(t *testing.T) {
typ := TypeOf(unexpi)

Expand All @@ -3389,8 +3379,6 @@ func TestUnexportedMethods(t *testing.T) {
}
}

*/

type InnerInt struct {
X int
}
Expand Down Expand Up @@ -3432,6 +3420,8 @@ func TestEmbeddedMethods(t *testing.T) {
}
}
*/

type FuncDDD func(...any) error

func (f FuncDDD) M() {}
Expand All @@ -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
Expand Down Expand Up @@ -3489,6 +3480,8 @@ func TestPtrToGC(t *testing.T) {
}
}
*/

func TestAddr(t *testing.T) {
var p struct {
X, Y int
Expand Down Expand Up @@ -3591,8 +3584,6 @@ func TestAllocations(t *testing.T) {
})
}

*/

func TestSmallNegativeInt(t *testing.T) {
i := int16(-1)
v := ValueOf(i)
Expand Down

0 comments on commit b6fd0c8

Please # to comment.