gotools/gopls/internal/cache/testfuncs/tests.go

type Index

// Decode decodes the given gob-encoded data as an Index.
func Decode(data []byte) *Index {}

// Encode encodes the receiver as gob-encoded data.
func (index *Index) Encode() []byte {}

func (index *Index) All() []Result {}

type Result

// NewIndex returns a new index of method-set information for all
// package-level types in the specified package.
func NewIndex(files []*parsego.File, info *types.Info) *Index {}

// build adds to the index all tests of the specified package.
func (b *indexBuilder) build(files []*parsego.File, info *types.Info) *Index {}

func (b *indexBuilder) findSubtests(parent gobTest, typ *ast.FuncType, body *ast.BlockStmt, file *parsego.File, files []*parsego.File, info *types.Info) []gobTest {}

// findFunc finds the type and body of the given expr, which may be a function
// literal or reference to a declared function.
//
// If no function is found, findFunc returns (nil, nil).
func findFunc(files []*parsego.File, info *types.Info, body *ast.BlockStmt, expr ast.Expr) (*ast.FuncType, *ast.BlockStmt) {}

var reTest

var reBenchmark

var reFuzz

var reExample

// isTestOrExample reports whether the given func is a testing func or an
// example func (or neither). isTestOrExample returns (true, false) for testing
// funcs, (false, true) for example funcs, and (false, false) otherwise.
func isTestOrExample(fn *types.Func) (isTest, isExample bool) {}

// testKind returns the parameter type TypeName of a test, benchmark, or fuzz
// function (one of testing.[TBF]).
func testKind(sig *types.Signature) (*types.TypeName, bool) {}

type indexBuilder

var packageCodec

type gobPackage

type gobFile

type gobTest

func (t *gobTest) result() Result {}