common holds the elements common between T and B and captures common methods such as Errorf.
| 60 | // common holds the elements common between T and B and |
| 61 | // captures common methods such as Errorf. |
| 62 | type common struct { |
| 63 | output *logger |
| 64 | indent string |
| 65 | ran bool // Test or benchmark (or one of its subtests) was executed. |
| 66 | failed bool // Test or benchmark has failed. |
| 67 | skipped bool // Test of benchmark has been skipped. |
| 68 | cleanups []func() // optional functions to be called at the end of the test |
| 69 | finished bool // Test function has completed. |
| 70 | |
| 71 | hasSub bool // TODO: should be atomic |
| 72 | |
| 73 | parent *common |
| 74 | level int // Nesting depth of test or benchmark. |
| 75 | name string // Name of test or benchmark. |
| 76 | start time.Time // Time test or benchmark started |
| 77 | duration time.Duration |
| 78 | |
| 79 | tempDir string |
| 80 | tempDirErr error |
| 81 | tempDirSeq int32 |
| 82 | |
| 83 | ctx context.Context |
| 84 | cancelCtx context.CancelFunc |
| 85 | } |
| 86 | |
| 87 | type logger struct { |
| 88 | logToStdout bool |
nothing calls this directly
no outgoing calls
no test coverage detected