func testWaitGroup(t *testing.T, wg1 *WaitGroup, wg2 *WaitGroup) { … } func TestWaitGroup(t *testing.T) { … } func TestWaitGroupMisuse(t *testing.T) { … } func TestWaitGroupRace(t *testing.T) { … } func TestWaitGroupAlign(t *testing.T) { … } func BenchmarkWaitGroupUncontended(b *testing.B) { … } func benchmarkWaitGroupAddDone(b *testing.B, localWork int) { … } func BenchmarkWaitGroupAddDone(b *testing.B) { … } func BenchmarkWaitGroupAddDoneWork(b *testing.B) { … } func benchmarkWaitGroupWait(b *testing.B, localWork int) { … } func BenchmarkWaitGroupWait(b *testing.B) { … } func BenchmarkWaitGroupWaitWork(b *testing.B) { … } func BenchmarkWaitGroupActuallyWait(b *testing.B) { … }