diff options
| author | Paul Buetow <paul@buetow.org> | 2020-08-06 11:18:13 +0100 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2020-08-06 11:18:13 +0100 |
| commit | f8cd759c94be1f0daeba46940fac0ca3d4201388 (patch) | |
| tree | 817149e0a1fa331e4d9f74e55910c6dd0d9bc802 /sort/sort_test.go | |
| parent | d330522b31f9a32e9549745008b596fdca9b17e5 (diff) | |
| parent | ddee1778446fbdf17587fed5ba2b6edc76c05b69 (diff) | |
merge
Diffstat (limited to 'sort/sort_test.go')
| -rw-r--r-- | sort/sort_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sort/sort_test.go b/sort/sort_test.go index 8415d7d..a0e4729 100644 --- a/sort/sort_test.go +++ b/sort/sort_test.go @@ -56,6 +56,12 @@ func TestMerge3Sort(t *testing.T) { test(Merge3, maxLength*2, t) } +func TestQuickSort(t *testing.T) { + for i := 1; i <= maxLength; i *= 10 { + test(Quick, i, t) + } +} + func TestShuffleSort(t *testing.T) { for i := 10; i <= maxLength; i *= 10 { testShuffle(Shuffle, i, t) @@ -98,6 +104,12 @@ func BenchmarkMerge3Sort(b *testing.B) { } } +func BenchmarkQuickSort(b *testing.B) { + for i := 1; i <= maxLength; i *= 10 { + benchmark(Quick, i, b) + } +} + func BenchmarkShuffleSort(b *testing.B) { for i := 1; i <= maxLength; i *= 10 { benchmark(Shuffle, i, b) |
