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 ¶
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.
Click to show internal directories.
Click to hide internal directories.