testutil

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package testutil provides shared test helpers. Target type-checks a single source file in-process and returns a common.Target with amd64 sizes, so package tests get a real typed package without shelling out to `go list`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Target

func Target(tb testing.TB, src string) common.Target

Target parses and type-checks src (a complete .go file, including its package clause) and returns a common.Target with deterministic amd64 sizes. It runs the test from a temp dir (tb.Chdir, auto-restored) and writes the source to "src.go" there, so the recorded filename is stable and exists on disk.

Types

This section is empty.

Jump to

Keyboard shortcuts

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