Help us shape the future of Go! Take the 2026 Go Developer Survey

testutil

package
v7.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileAndGetFunction

func CompileAndGetFunction(t *testing.T, src, funcName string) *ssa.Function

CompileAndGetFunction builds SSA from source and returns the requested function. This allows low-level analysis packages to be tested in isolation.

func GetFunctionNames

func GetFunctionNames(results []diff.FingerprintResult) []string

GetFunctionNames extracts function names from results for easier verification. Exported for use in external test packages.

func SetupTestEnv

func SetupTestEnv(t *testing.T, prefix string) (string, func())

SetupTestEnv creates an isolated workspace with a valid go.mod. Returns the directory path and a cleanup function.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL