package testdeps
import "testing/internal/testdeps"
Package testdeps provides access to dependencies needed by test execution.
This package is imported by the generated main package, which passes TestDeps into testing.Main. This allows tests to use packages at run time without making those packages direct dependencies of package testing. Direct dependencies of package testing are harder to write tests for.
Index ¶
- Variables
- type TestDeps
- func (TestDeps) ImportPath() string
- func (TestDeps) MatchString(pat, str string) (result bool, err error)
- func (TestDeps) SetPanicOnExit0(v bool)
- func (TestDeps) StartCPUProfile(w io.Writer) error
- func (TestDeps) StartTestLog(w io.Writer)
- func (TestDeps) StopCPUProfile()
- func (TestDeps) StopTestLog() error
- func (TestDeps) WriteProfileTo(name string, w io.Writer, debug int) error
Variables ¶
var ImportPath string
ImportPath is the import path of the testing binary, set by the generated main function.
Types ¶
type TestDeps ¶
type TestDeps struct{}
TestDeps is an implementation of the testing.testDeps interface, suitable for passing to testing.MainStart.
func (TestDeps) ImportPath ¶
func (TestDeps) MatchString ¶
func (TestDeps) SetPanicOnExit0 ¶
SetPanicOnExit0 tells the os package whether to panic on os.Exit(0).
func (TestDeps) StartCPUProfile ¶
func (TestDeps) StartTestLog ¶
func (TestDeps) StopCPUProfile ¶
func (TestDeps) StopCPUProfile()
func (TestDeps) StopTestLog ¶
func (TestDeps) WriteProfileTo ¶
Source Files ¶
- Version
- v1.16.6
- Published
- Jul 12, 2021
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- now –
Tools for package owners.