algorithms/sorting/sort_test.go

26 lines
399 B
Go
Raw Normal View History

2021-12-06 08:01:25 +02:00
package sorting
import (
"testing"
)
func TestSelection(t *testing.T) {
CheckSorter(NewSelection())
}
2021-12-14 12:35:28 +02:00
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())
}
}