similarGoroutines compares slice of Goroutine to be similar enough. Warning: it mutates inputs.
(t *testing.T, want, got []*Goroutine)
| 420 | // |
| 421 | // Warning: it mutates inputs. |
| 422 | func similarGoroutines(t *testing.T, want, got []*Goroutine) { |
| 423 | zapGoroutines(t, want, got) |
| 424 | if diff := cmp.Diff(want, got); diff != "" { |
| 425 | t.Helper() |
| 426 | t.Fatalf("Goroutine mismatch (-want +got):\n%s", diff) |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | func zapGoroutines(t *testing.T, want, got []*Goroutine) { |
| 431 | if len(want) != len(got) { |
no test coverage detected
searching dependent graphs…