(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func 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 | } |
nothing calls this directly
no test coverage detected