tests

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package tests holds the integration / blackbox test harness for prof.

Test fixtures (committed pprof binaries under assets/fixtures/) are regenerated by `go generate ./tests/...`, which delegates to the `//go:build ignore` regeneration tool fixtures_regen.go.

Edge-case and invariant tests live in edgecases_*_test.go files (names prefixed TestEdge). They run with the rest of the package under go test ./tests or go test ./.... To run only edge tests locally: go test ./tests -run '^TestEdge' -count=1

Index

Constants

This section is empty.

Variables

View Source
var BenchmarkContent string

BenchmarkContent is embedded benchmark test source used when creating synthetic modules.

Functions

func TestMain added in v1.8.2

func TestMain(m *testing.M)

TestMain runs all package tests and cleans up the shared synthetic env on exit. Tests that need their own scratch env (TestManualCommand, TestTrackerBasicRun) continue to manage their own t.Cleanup blocks.

Types

type FieldsCheck

type FieldsCheck struct {
	// contains filtered or unexported fields
}

FieldsCheck records expected min/max appearances for an output file in a test run.

func (*FieldsCheck) IsWithinRange

func (fc *FieldsCheck) IsWithinRange() bool

IsWithinRange reports whether currentAppearances is between minimum and maximum inclusive.

type TestArgs

type TestArgs struct {
	// contains filtered or unexported fields
}

TestArgs holds inputs and expectations for a single integration test scenario.

Jump to

Keyboard shortcuts

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