()
| 104 | var _ testing.TB = &fakeT{} |
| 105 | |
| 106 | func (t *fakeT) runCleanupFns() { |
| 107 | t.mu.Lock() |
| 108 | cleanupFns := slices.Clone(t.cleanupFns) |
| 109 | t.mu.Unlock() |
| 110 | |
| 111 | // Execute in LIFO order to match the behavior of *testing.T. |
| 112 | slices.Reverse(cleanupFns) |
| 113 | for _, fn := range cleanupFns { |
| 114 | fn() |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | // Chdir implements testing.TB. |
| 119 | func (*fakeT) Chdir(_ string) { |