(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func TestPathCleanMallocs(t *testing.T) { |
| 79 | if testing.Short() { |
| 80 | t.Skip("skipping malloc count in short mode") |
| 81 | } |
| 82 | if runtime.GOMAXPROCS(0) > 1 { |
| 83 | t.Log("skipping AllocsPerRun checks; GOMAXPROCS>1") |
| 84 | return |
| 85 | } |
| 86 | |
| 87 | for _, test := range cleanTests { |
| 88 | allocs := testing.AllocsPerRun(100, func() { CleanPath(test.result) }) |
| 89 | if allocs > 0 { |
| 90 | t.Errorf("CleanPath(%q): %v allocs, want zero", test.result, allocs) |
| 91 | } |
| 92 | } |
| 93 | } |
nothing calls this directly
no test coverage detected