algorithms/sorting/sort_test.go
2021-12-14 14:01:44 +02:00

35 lines
563 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())
}
}
func TestShell(t *testing.T) {
CheckSorter(NewShell())
}
func BenchmarkShell(b *testing.B) {
for i := 0; i < b.N; i++ {
BenchmarkSort(10000, NewShell())
}
}