Documentation
¶
Index ¶
- func BuildAndCheckSymbolsFromDir(t *testing.T, sel, relDir string, names []string, opts ...RunOption)
- func CaptureMeta(relPkg, pkgDir string) (string, error)
- func CompileIREx(t *testing.T, src any, fname string, dbg bool, configure func(llssa.Program)) string
- func FilterEmulatorOutput(output string) string
- func FromDir(t *testing.T, sel, relDir string)
- func InitDebug()
- func Pkg(t *testing.T, pkgPath, outFile string)
- func RunAndCapture(relPkg, pkgDir string) ([]byte, error)
- func RunAndCaptureWithConf(relPkg, pkgDir string, conf *build.Config) ([]byte, error)
- func RunAndTestFromDir(t *testing.T, sel, relDir string, ignore []string, opts ...RunOption)
- func TestCompileEx(t *testing.T, src any, fname, expected string, dbg bool)
- type RunOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAndCheckSymbolsFromDir ¶
func BuildAndCheckSymbolsFromDir(t *testing.T, sel, relDir string, names []string, opts ...RunOption)
BuildAndCheckSymbolsFromDir builds the named tests under relDir and validates SYMBOL FileCheck directives against the linked binary symbol table.
func CaptureMeta ¶
CaptureMeta builds relPkg and returns the package metadata captured for pkgDir.
func CompileIREx ¶
func FilterEmulatorOutput ¶
FilterEmulatorOutput strips emulator boot logs by returning output after "entry 0x...".
func RunAndCapture ¶
func RunAndCaptureWithConf ¶
RunAndCaptureWithConf runs llgo with a custom build config and captures output.
func RunAndTestFromDir ¶
RunAndTestFromDir executes tests under relDir and validates both runtime output and the pre-transform package IR snapshot when the corresponding golden files exist.
Types ¶
type RunOption ¶
type RunOption func(*runOptions)
RunOption customizes directory-based test behavior.
func WithIRCheck ¶
WithIRCheck enables or disables IR golden checks in RunAndTestFromDir.
func WithMetaCheck ¶
WithMetaCheck enables or disables package metadata golden checks.
func WithOutputCheck ¶
WithOutputCheck enables or disables runtime output golden checks.
func WithOutputFilter ¶
WithOutputFilter applies a filter to output before comparison.
func WithRunConfig ¶
WithRunConfig uses the provided build config for test runs.