summaryrefslogtreecommitdiff
path: root/sort/sort_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'sort/sort_test.go')
-rw-r--r--sort/sort_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/sort/sort_test.go b/sort/sort_test.go
index d8250c4..ad75fff 100644
--- a/sort/sort_test.go
+++ b/sort/sort_test.go
@@ -34,7 +34,7 @@ func TestShellSort(t *testing.T) {
}
func TestShuffleSort(t *testing.T) {
- for i := 1; i <= maxLength; i *= 10 {
+ for i := 10; i <= maxLength; i *= 10 {
testShuffle(Shuffle, i, t)
}
}
@@ -57,6 +57,12 @@ func BenchmarkShellSort(b *testing.B) {
}
}
+func BenchmarkShuffleSort(b *testing.B) {
+ for i := 1; i <= maxLength; i *= 10 {
+ benchmark(Shuffle, i, b)
+ }
+}
+
func test(sort sortAlgorithm, length int, t *testing.T) {
cb := func(t *testing.T) {
t.Parallel()
@@ -92,6 +98,5 @@ func benchmark(sort sortAlgorithm, length int, b *testing.B) {
}
func makeIntegers(length, max int) ds.ArrayList {
- //return ds.ReverseSortedIntegers(length)
return ds.RandomIntegers(length, max)
}