go/src/reflect/all_test.go

var sink

func TestBool(t *testing.T) {}

type integer

type T

var _

type pair

func assert(t *testing.T, s, want string) {}

var typeTests

var valueTests

func testType(t *testing.T, i int, typ Type, want string) {}

func TestTypes(t *testing.T) {}

func TestSet(t *testing.T) {}

func TestSetValue(t *testing.T) {}

func TestMapIterSet(t *testing.T) {}

func TestCanIntUintFloatComplex(t *testing.T) {}

func TestCanSetField(t *testing.T) {}

var _i

var valueToStringTests

func TestValueToString(t *testing.T) {}

func TestArrayElemSet(t *testing.T) {}

func TestPtrPointTo(t *testing.T) {}

func TestPtrSetNil(t *testing.T) {}

func TestMapSetNil(t *testing.T) {}

func TestAll(t *testing.T) {}

func TestInterfaceGet(t *testing.T) {}

func TestInterfaceValue(t *testing.T) {}

func TestFunctionValue(t *testing.T) {}

func TestGrow(t *testing.T) {}

var appendTests

func TestAppend(t *testing.T) {}

func TestCopy(t *testing.T) {}

func TestCopyString(t *testing.T) {}

func TestCopyArray(t *testing.T) {}

func TestBigUnnamedStruct(t *testing.T) {}

type big

func TestBigStruct(t *testing.T) {}

type Basic

type NotBasic

type DeepEqualTest

var fn1

var fn2

var fn3

type self

type Loop

type Loopy

var (
	loop1
	loop2
)

var (
	loopy1
	loopy2
)

var (
	cycleMap1
	cycleMap2
	cycleMap3
)

type structWithSelfPtr

func init() {}

var deepEqualTests

func TestDeepEqual(t *testing.T) {}

func TestTypeOf(t *testing.T) {}

type Recursive

func TestDeepEqualRecursiveStruct(t *testing.T) {}

type _Complex

func TestDeepEqualComplexStruct(t *testing.T) {}

func TestDeepEqualComplexStructInequality(t *testing.T) {}

type UnexpT

func TestDeepEqualUnexportedMap(t *testing.T) {}

var deepEqualPerfTests

func TestDeepEqualAllocs(t *testing.T) {}

func check2ndField(x any, offs uintptr, t *testing.T) {}

// Check that structure alignment & offsets viewed through reflect agree with those
// from the compiler itself.
func TestAlignment(t *testing.T) {}

func Nil(a any, t *testing.T) {}

func NotNil(a any, t *testing.T) {}

func TestIsNil(t *testing.T) {}

func setField[S, V any](in S, offset uintptr, value V) (out S) {}

func TestIsZero(t *testing.T) {}

func TestInternalIsZero(t *testing.T) {}

func TestInterfaceExtraction(t *testing.T) {}

func TestNilPtrValueSub(t *testing.T) {}

func TestMap(t *testing.T) {}

func TestNilMap(t *testing.T) {}

func TestChan(t *testing.T) {}

type caseInfo

var allselect

func TestSelect(t *testing.T) {}

func TestSelectMaxCases(t *testing.T) {}

func TestSelectNop(t *testing.T) {}

var selectWatch

func selectWatcher() {}

// runSelect runs a single select test.
// It returns the values returned by Select but also returns
// a panic value if the Select panics.
func runSelect(cases []SelectCase, info []caseInfo) (chosen int, recv Value, recvOK bool, panicErr any) {}

// fmtSelect formats the information about a single select test.
func fmtSelect(info []caseInfo) string {}

type two

// Difficult test for function call because of
// implicit padding between arguments.
func dummy(b byte, c int, d byte, e two, f byte, g float32, h byte) (i byte, j int, k byte, l two, m byte, n float32, o byte) {}

func TestFunc(t *testing.T) {}

func TestCallConvert(t *testing.T) {}

type emptyStruct

type nonEmptyStruct

func returnEmpty() emptyStruct {}

func takesEmpty(e emptyStruct) {}

func returnNonEmpty(i int) nonEmptyStruct {}

func takesNonEmpty(n nonEmptyStruct) int {}

func TestCallWithStruct(t *testing.T) {}

func TestCallReturnsEmpty(t *testing.T) {}

func TestMakeFunc(t *testing.T) {}

func TestMakeFuncInterface(t *testing.T) {}

func TestMakeFuncVariadic(t *testing.T) {}

type WC

func (w *WC) Write(p []byte) (n int, err error) {}

func (w *WC) Close() error {}

func TestMakeFuncValidReturnAssignments(t *testing.T) {}

func TestMakeFuncInvalidReturnAssignments(t *testing.T) {}

type Point

// This will be index 0.
func (p Point) AnotherMethod(scale int) int {}

// This will be index 1.
func (p Point) Dist(scale int) int {}

// This will be index 2.
func (p Point) GCMethod(k int) int {}

// This will be index 3.
func (p Point) NoArgs() {}

// This will be index 4.
func (p Point) TotalDist(points ...Point) int {}

// This will be index 5.
func (p *Point) Int64Method(x int64) int64 {}

// This will be index 6.
func (p *Point) Int32Method(x int32) int32 {}

func TestMethod(t *testing.T) {}

func TestMethodValue(t *testing.T) {}

func TestVariadicMethodValue(t *testing.T) {}

type DirectIfaceT

func (d DirectIfaceT) M() int {}

func TestDirectIfaceMethod(t *testing.T) {}

type Tinter

type Tsmallv

func (v Tsmallv) M(x int, b byte) (byte, int) {}

type Tsmallp

func (p *Tsmallp) M(x int, b byte) (byte, int) {}

type Twordv

func (v Twordv) M(x int, b byte) (byte, int) {}

type Twordp

func (p *Twordp) M(x int, b byte) (byte, int) {}

type Tbigv

func (v Tbigv) M(x int, b byte) (byte, int) {}

type Tbigp

func (p *Tbigp) M(x int, b byte) (byte, int) {}

type tinter

type Tm1

type Tm2

type Tm3

type Tm4

func (t4 Tm4) M(x int, b byte) (byte, int) {}

func TestMethod5(t *testing.T) {}

func TestInterfaceSet(t *testing.T) {}

type T1

func TestAnonymousFields(t *testing.T) {}

type FTest

type D1

type D2

type S0

type S1

type S2

type S1x

type S1y

type S3

type S4

type S5

type S6

type S7

type S8

type S9

type S10

type S11

type S12

type S13

type S14

type S15

type S16

var fieldTests

func TestFieldByIndex(t *testing.T) {}

func TestFieldByName(t *testing.T) {}

func TestImportPath(t *testing.T) {}

func TestFieldPkgPath(t *testing.T) {}

func TestMethodPkgPath(t *testing.T) {}

func TestVariadicType(t *testing.T) {}

type inner

type outer

func (*inner) M() {}

func (*outer) M() {}

func TestNestedMethods(t *testing.T) {}

type unexp

func (*unexp) f() (int32, int8) {}

func (*unexp) g() (int64, int8) {}

type unexpI

func TestUnexportedMethods(t *testing.T) {}

type InnerInt

type OuterInt

func (i *InnerInt) M() int {}

func TestEmbeddedMethods(t *testing.T) {}

type FuncDDD

func (f FuncDDD) M() {}

func TestNumMethodOnDDD(t *testing.T) {}

func TestPtrTo(t *testing.T) {}

func TestPtrToGC(t *testing.T) {}

func TestAddr(t *testing.T) {}

func noAlloc(t *testing.T, n int, f func(int)) {}

func TestAllocations(t *testing.T) {}

func TestSmallNegativeInt(t *testing.T) {}

func TestIndex(t *testing.T) {}

func TestSlice(t *testing.T) {}

func TestSlice3(t *testing.T) {}

func TestSetLenCap(t *testing.T) {}

func TestVariadic(t *testing.T) {}

func TestFuncArg(t *testing.T) {}

func TestStructArg(t *testing.T) {}

var tagGetTests

func TestTagGet(t *testing.T) {}

func TestBytes(t *testing.T) {}

func TestSetBytes(t *testing.T) {}

type Private

func (p *Private) m() {}

type private

func (p *private) P() {}

type Public

func (p *Public) M() {}

func TestUnexported(t *testing.T) {}

func TestSetPanic(t *testing.T) {}

type timp

func (t timp) W() {}

func (t timp) Y() {}

func (t timp) w() {}

func (t timp) y() {}

func TestCallPanic(t *testing.T) {}

func TestValuePanic(t *testing.T) {}

func shouldPanic(expect string, f func()) {}

func isNonNil(x any) {}

func isValid(v Value) {}

func TestAlias(t *testing.T) {}

var V

func EmptyInterfaceV(x any) Value {}

func ReaderV(x io.Reader) Value {}

func ReadWriterV(x io.ReadWriter) Value {}

type Empty

type MyStruct

type MyStruct1

type MyStruct2

type MyString

type MyBytes

type MyBytesArrayPtr0

type MyBytesArrayPtr

type MyBytesArray0

type MyBytesArray

type MyRunes

type MyFunc

type MyByte

type IntChan

type IntChanRecv

type IntChanSend

type BytesChan

type BytesChanRecv

type BytesChanSend

var convertTests

func TestConvert(t *testing.T) {}

func TestConvertPanic(t *testing.T) {}

func TestConvertSlice2Array(t *testing.T) {}

var gFloat32

const snan

func TestConvertNaNs(t *testing.T) {}

type ComparableStruct

type NonComparableStruct

var comparableTests

func TestComparable(t *testing.T) {}

func TestValueOverflow(t *testing.T) {}

func TestTypeOverflow(t *testing.T) {}

func checkSameType(t *testing.T, x Type, y any) {}

func TestArrayOf(t *testing.T) {}

func TestArrayOfGC(t *testing.T) {}

func TestArrayOfAlg(t *testing.T) {}

func TestArrayOfGenericAlg(t *testing.T) {}

func TestArrayOfDirectIface(t *testing.T) {}

// Ensure passing in negative lengths panics.
// See https://golang.org/issue/43603
func TestArrayOfPanicOnNegativeLength(t *testing.T) {}

func TestSliceOf(t *testing.T) {}

func TestSliceOverflow(t *testing.T) {}

func TestSliceOfGC(t *testing.T) {}

func TestStructOfFieldName(t *testing.T) {}

func TestStructOf(t *testing.T) {}

func TestStructOfExportRules(t *testing.T) {}

func TestStructOfGC(t *testing.T) {}

func TestStructOfAlg(t *testing.T) {}

func TestStructOfGenericAlg(t *testing.T) {}

func TestStructOfDirectIface(t *testing.T) {}

type StructI

func (i StructI) Get() int {}

type StructIPtr

func (i *StructIPtr) Get() int  {}

func (i *StructIPtr) Set(v int) {}

type SettableStruct

func (p *SettableStruct) Set(v int) {}

type SettablePointer

func (p *SettablePointer) Set(v int) {}

func TestStructOfWithInterface(t *testing.T) {}

func TestStructOfTooManyFields(t *testing.T) {}

func TestStructOfDifferentPkgPath(t *testing.T) {}

func TestStructOfTooLarge(t *testing.T) {}

func TestStructOfAnonymous(t *testing.T) {}

func TestChanOf(t *testing.T) {}

func TestChanOfDir(t *testing.T) {}

func TestChanOfGC(t *testing.T) {}

func TestMapOf(t *testing.T) {}

func TestMapOfGCKeys(t *testing.T) {}

func TestMapOfGCValues(t *testing.T) {}

func TestTypelinksSorted(t *testing.T) {}

func TestFuncOf(t *testing.T) {}

type R0

type R1

type R2

type R3

type R4

type R5

type R6

type R7

type R8

type R9

type R10

type R11

type R12

type R13

type R14

type R15

type R16

type R17

type R18

type R19

type R20

type R21

type R22

type R23

type R24

func TestEmbed(t *testing.T) {}

func TestAllocsInterfaceBig(t *testing.T) {}

func TestAllocsInterfaceSmall(t *testing.T) {}

type exhaustive

type choice

func (x *exhaustive) Next() bool {}

func (x *exhaustive) Choose(max int) int {}

func (x *exhaustive) Maybe() bool {}

func GCFunc(args []Value) []Value {}

func TestReflectFuncTraceback(t *testing.T) {}

func TestReflectMethodTraceback(t *testing.T) {}

func TestSmallZero(t *testing.T) {}

func TestBigZero(t *testing.T) {}

func TestZeroSet(t *testing.T) {}

func TestFieldByIndexNil(t *testing.T) {}

type Outer

type Inner

func (pi *Inner) M() {}

func TestCallMethodJump(t *testing.T) {}

func TestCallArgLive(t *testing.T) {}

func TestMakeFuncStackCopy(t *testing.T) {}

// use about n KB of stack
func useStack(n int) {}

type Impl

func (Impl) F() {}

func TestValueString(t *testing.T) {}

func TestInvalid(t *testing.T) {}

// Issue 8917.
func TestLargeGCProg(t *testing.T) {}

func fieldIndexRecover(t Type, i int) (recovered any) {}

// Issue 15046.
func TestTypeFieldOutOfRangePanic(t *testing.T) {}

func TestTypeFieldReadOnly(t *testing.T) {}

// Issue 9179.
func TestCallGC(t *testing.T) {}

// Issue 18635 (function version).
func TestKeepFuncLive(t *testing.T) {}

type UnExportedFirst

func (i UnExportedFirst) ΦExported()  {}

func (i UnExportedFirst) unexported() {}

// Issue 21177
func TestMethodByNameUnExportedFirst(t *testing.T) {}

type KeepMethodLive

func (k KeepMethodLive) Method1(i int) {}

func (k KeepMethodLive) Method2(i int) {}

func TestKeepMethodLive(t *testing.T) {}

// clobber tries to clobber unreachable memory.
func clobber() {}

func TestFuncLayout(t *testing.T) {}

// trimBitmap removes trailing 0 elements from b and returns the result.
func trimBitmap(b []byte) []byte {}

func verifyGCBits(t *testing.T, typ Type, bits []byte) {}

func verifyGCBitsSlice(t *testing.T, typ Type, cap int, bits []byte) {}

type Xscalar

type Xptr

type Xptrscalar

type Xscalarptr

type Xbigptrscalar

var (
	Tscalar
	Tint64
	Tptr
	Tscalarptr
	Tptrscalar
	Tbigptrscalar
)

func init() {}

var empty

func TestGCBits(t *testing.T) {}

func rep(n int, b []byte) []byte {}

func join(b ...[]byte) []byte    {}

func lit(x ...byte) []byte       {}

func TestTypeOfTypeOf(t *testing.T) {}

type XM

func (*XM) String() string {}

func TestPtrToMethods(t *testing.T) {}

func TestMapAlloc(t *testing.T) {}

func TestChanAlloc(t *testing.T) {}

type TheNameOfThisTypeIsExactly255BytesLongSoWhenTheCompilerPrependsTheReflectTestPackageNameAndExtraStarTheLinkerRuntimeAndReflectPackagesWillHaveToCorrectlyDecodeTheSecondLengthByte0123456789_0123456789_0123456789_0123456789_0123456789_012345678

type nameTest

var nameTests

func TestNames(t *testing.T) {}

func TestExported(t *testing.T) {}

func TestTypeStrings(t *testing.T) {}

func TestOffsetLock(t *testing.T) {}

func TestSwapper(t *testing.T) {}

// TestUnaddressableField tests that the reflect package will not allow
// a type from another package to be used as a named type with an
// unexported field.
//
// This ensures that unexported fields cannot be modified by other packages.
func TestUnaddressableField(t *testing.T) {}

type Tint

type Tint2

type Talias1

type Talias2

func TestAliasNames(t *testing.T) {}

func TestIssue22031(t *testing.T) {}

type NonExportedFirst

func (i NonExportedFirst) ΦExported()       {}

func (i NonExportedFirst) nonexported() int {}

func TestIssue22073(t *testing.T) {}

func TestMapIterNonEmptyMap(t *testing.T) {}

func TestMapIterNilMap(t *testing.T) {}

func TestMapIterReset(t *testing.T) {}

func TestMapIterSafety(t *testing.T) {}

func TestMapIterNext(t *testing.T) {}

func TestMapIterDelete0(t *testing.T) {}

func TestMapIterDelete1(t *testing.T) {}

// iterateToString returns the set of elements
// returned by an iterator in readable form.
func iterateToString(it *MapIter) string {}

func TestConvertibleTo(t *testing.T) {}

func TestSetIter(t *testing.T) {}

func TestMethodCallValueCodePtr(t *testing.T) {}

type A

type B

func TestIssue50208(t *testing.T) {}

func TestNegativeKindString(t *testing.T) {}

type namedBool

type namedBytes

func TestValue_Cap(t *testing.T) {}

func TestValue_Len(t *testing.T) {}

func TestValue_Comparable(t *testing.T) {}

type ValueEqualTest

var equalI

var equalSlice

var nilInterface

var mapInterface

var valueEqualTests

func TestValue_Equal(t *testing.T) {}

func TestValue_EqualNonComparable(t *testing.T) {}

func TestInitFuncTypes(t *testing.T) {}

func TestClear(t *testing.T) {}

func TestValuePointerAndUnsafePointer(t *testing.T) {}

// Test cases copied from ../../test/unsafebuiltins.go
func TestSliceAt(t *testing.T) {}

// Test that maps created with MapOf properly updates keys on overwrite as
// expected (i.e., it sets the key update flag in the map).
//
// This test is based on runtime.TestNegativeZero.
func TestMapOfKeyUpdate(t *testing.T) {}

// Test that maps created with MapOf properly panic on unhashable keys, even if
// the map is empty. (i.e., it sets the hash might panic flag in the map).
//
// This test is a simplified version of runtime.TestEmptyMapWithInterfaceKey
// for reflect.
func TestMapOfKeyPanic(t *testing.T) {}