MCPcopy Create free account
hub / github.com/arnauddri/algorithms / TestQuickSort

Function TestQuickSort

algorithms/sorting/quick-sort/quick_test.go:9–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestQuickSort(t *testing.T) {
10 list := utils.GetArrayOfSize(100)
11
12 sort(list)
13
14 for i := 0; i < len(list)-2; i++ {
15 if list[i] > list[i+1] {
16 fmt.Println(list)
17 t.Error()
18 }
19 }
20}
21
22func benchmarkQuickSort(n int, b *testing.B) {
23 list := utils.GetArrayOfSize(n)

Callers

nothing calls this directly

Calls 1

sortFunction · 0.70

Tested by

no test coverage detected