func BenchmarkParallelQuickSort(b *testing.B) { b.StopTimer() testData := generateInput(b.N) b.StartTimer() jobDone := make(chan bool) go sorts.ParallelQuickSort(testData, 0, len(testData)-1, jobDone) <-jobDone }
func TestParallelQuickSort(t *testing.T) { testData := generateInput(N) jobDone := make(chan bool) go sorts.ParallelQuickSort(testData, 0, len(testData)-1, jobDone) <-jobDone successIfSorted(testData, t) }