reflect: rename tests in value_test to avoid conflicts upstream tests

Этот коммит содержится в:
Damian Gryski 2023-03-22 14:48:44 -07:00 коммит произвёл Ron Evans
родитель 688a5dbf8d
коммит 45c916f5c0

Просмотреть файл

@ -7,7 +7,7 @@ import (
"testing" "testing"
) )
func TestIndirectPointers(t *testing.T) { func TestTinyIndirectPointers(t *testing.T) {
var m = map[string]int{} var m = map[string]int{}
m["x"] = 1 m["x"] = 1
@ -33,7 +33,7 @@ func TestIndirectPointers(t *testing.T) {
} }
} }
func TestMap(t *testing.T) { func TestTinyMap(t *testing.T) {
m := make(map[string]int) m := make(map[string]int)
@ -135,7 +135,7 @@ func TestMap(t *testing.T) {
} }
} }
func TestSlice(t *testing.T) { func TestTinySlice(t *testing.T) {
s := []int{0, 10, 20} s := []int{0, 10, 20}
refs := ValueOf(s) refs := ValueOf(s)
@ -202,7 +202,7 @@ func TestSlice(t *testing.T) {
} }
} }
func TestBytes(t *testing.T) { func TestTinyBytes(t *testing.T) {
s := []byte("abcde") s := []byte("abcde")
refs := ValueOf(s) refs := ValueOf(s)
@ -233,7 +233,7 @@ func TestBytes(t *testing.T) {
} }
} }
func TestNamedTypes(t *testing.T) { func TestTinyNamedTypes(t *testing.T) {
type namedString string type namedString string
named := namedString("foo") named := namedString("foo")
@ -287,7 +287,7 @@ func TestNamedTypes(t *testing.T) {
v.Set(n) v.Set(n)
} }
func TestStruct(t *testing.T) { func TestTinyStruct(t *testing.T) {
type barStruct struct { type barStruct struct {
QuxString string QuxString string
BazInt int BazInt int
@ -324,7 +324,7 @@ func TestStruct(t *testing.T) {
} }
} }
func TestZero(t *testing.T) { func TestTinyZero(t *testing.T) {
s := "hello, world" s := "hello, world"
var sptr *string = &s var sptr *string = &s
v := ValueOf(&sptr).Elem() v := ValueOf(&sptr).Elem()
@ -358,7 +358,7 @@ func addrSetInt(intf interface{}) {
*ptr = 112358 *ptr = 112358
} }
func TestAddr(t *testing.T) { func TestTinyAddr(t *testing.T) {
var n uint64 var n uint64
addrDecode(&n) addrDecode(&n)
if n != 112358 { if n != 112358 {
@ -371,7 +371,7 @@ func TestAddr(t *testing.T) {
} }
} }
func TestNilType(t *testing.T) { func TestTinyNilType(t *testing.T) {
var a any = nil var a any = nil
typ := TypeOf(a) typ := TypeOf(a)
if typ != nil { if typ != nil {
@ -379,7 +379,7 @@ func TestNilType(t *testing.T) {
} }
} }
func TestSetBytes(t *testing.T) { func TestTinySetBytes(t *testing.T) {
var b []byte var b []byte
refb := ValueOf(&b).Elem() refb := ValueOf(&b).Elem()
s := []byte("hello") s := []byte("hello")
@ -417,7 +417,7 @@ func (m *methodStruct) pointerMethod3() int {
return m.i return m.i
} }
func TestNumMethods(t *testing.T) { func TestTinyNumMethods(t *testing.T) {
refptrt := TypeOf(&methodStruct{}) refptrt := TypeOf(&methodStruct{})
if got, want := refptrt.NumMethod(), 2+3; got != want { if got, want := refptrt.NumMethod(), 2+3; got != want {
t.Errorf("Pointer Methods=%v, want %v", got, want) t.Errorf("Pointer Methods=%v, want %v", got, want)