algorithms/sorting/sort_test.go
2021-12-14 12:35:28 +02:00

25 lines
399 B
Go

package sorting
import (
"testing"
)
func TestSelection(t *testing.T) {
CheckSorter(NewSelection())
}
func BenchmarkSelection(b *testing.B) {
for i := 0; i < b.N; i++ {
BenchmarkSort(10000, NewSelection())
}
}
func TestInsertion(t *testing.T) {
CheckSorter(NewInsertion())
}
func BenchmarkInsertion(b *testing.B) {
for i := 0; i < b.N; i++ {
BenchmarkSort(10000, NewInsertion())
}
}