MCPcopy Index your code
hub / github.com/greyireland/algorithm-pattern / TestHeapSort

Function TestHeapSort

src/sort/heap_sort_test.go:8–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func TestHeapSort(t *testing.T) {
9 type args struct {
10 a []int
11 }
12 tests := []struct {
13 name string
14 args args
15 want []int
16 }{
17 {"", args{a: []int{7, 8, 9, 2, 3, 5}}, []int{2, 3, 5, 7, 8, 9}},
18 }
19 for _, tt := range tests {
20 t.Run(tt.name, func(t *testing.T) {
21 if got := HeapSort(tt.args.a); !reflect.DeepEqual(got, tt.want) {
22 t.Errorf("HeapSort() = %v, want %v", got, tt.want)
23 }
24 })
25 }
26}

Callers

nothing calls this directly

Calls 1

HeapSortFunction · 0.85

Tested by

no test coverage detected