Lines Matching defs:common
595 type common struct { struct
596 mu sync.RWMutex // guards this group of fields
597 output []byte // Output generated by test or benchmark.
598 w io.Writer // For flushToParent.
599 ran bool // Test or benchmark (or one of its subtests) was executed.
600 failed bool // Test or benchmark has failed.
601 skipped bool // Test or benchmark has been skipped.
602 done bool // Test is finished and all subtests have completed.
603 helperPCs map[uintptr]struct{} // functions to be skipped when writing file/line info
604 helperNames map[string]struct{} // helperPCs converted to function names
605 cleanups []func() // optional functions to be called at the end of the test
606 cleanupName string // Name of the cleanup function.
607 cleanupPc []uintptr // The stack trace at the point where Cleanup was called.
608 finished bool // Test function has completed.
609 inFuzzFn bool // Whether the fuzz target, if this is one, is running.
611 chatty *chattyPrinter // A copy of chattyPrinter, if the chatty flag is set.
612 bench bool // Whether the current test is a benchmark.
613 hasSub atomic.Bool // whether there are sub-benchmarks.
614 cleanupStarted atomic.Bool // Registered cleanup callbacks have started to execute
615 runner string // Function name of tRunner running the test.
616 isParallel bool // Whether the test is parallel.
618 parent *common
619 level int // Nesting depth of test or benchmark.
620 …tor []uintptr // If level > 0, the stack trace at the point where the parent called t.Run.
621 name string // Name of test or benchmark.
622 start highPrecisionTime // Time test or benchmark started
623 duration time.Duration
624 …allel subtests they may start. Nil when T.Parallel is not present (B) or not usable (when fuzzing).
625 signal chan bool // To signal a test is done.
626 sub []*T // Queue of subtests to be run in parallel.
628 lastRaceErrors atomic.Int64 // Max value of race.Errors seen during the test or its subtests.
629 raceErrorLogged atomic.Bool
631 tempDirMu sync.Mutex
632 tempDir string
633 tempDirErr error
634 tempDirSeq int32
685 func (c *common) checkFuzzFn(name string) {
696 func (c *common) frameSkip(skip int) runtime.Frame {
770 func (c *common) decorate(s string, skip int) string {
807 func (c *common) flushToParent(testName, format string, args ...any) {
919 common anonMember
924 func (c *common) private() {}
931 func (c *common) Name() string {
935 func (c *common) setRan() {
945 func (c *common) Fail() {
959 func (c *common) Failed() bool {
980 func (c *common) FailNow() {
1010 func (c *common) log(s string) {
1015 func (c *common) logDepth(s string, depth int) {
1050 func (c *common) Log(args ...any) {
1060 func (c *common) Logf(format string, args ...any) {
1066 func (c *common) Error(args ...any) {
1073 func (c *common) Errorf(format string, args ...any) {
1080 func (c *common) Fatal(args ...any) {
1087 func (c *common) Fatalf(format string, args ...any) {
1094 func (c *common) Skip(args ...any) {
1101 func (c *common) Skipf(format string, args ...any) {
1115 func (c *common) SkipNow() {
1125 func (c *common) Skipped() bool {
1134 func (c *common) Helper() {
1155 func (c *common) Cleanup(f func()) {
1189 func (c *common) TempDir() string {
1291 func (c *common) Setenv(key, value string) {
1321 func (c *common) runCleanup(ph panicHandling) (panicVal any) {
1363 func (c *common) resetRaces() {
1381 func (c *common) checkRaces() (raceErrors int64) {