1
0
Fork 0
algorithms-go/sort/selection_sort_test.go

19 lines
268 B
Go

package sort
import (
"testing"
)
func TestSelectionSort(t *testing.T) {
testSort(t, SelectionSort,
[]int{5, 3, 1, 4, 2},
[]int{1, 2, 3, 4, 5},
)
}
func BenchmarkSelectionSort(b *testing.B) {
for i := 0; i < b.N; i++ {
SelectionSort(unsortedArray())
}
}