diff options
| author | Paul Buetow <paul@buetow.org> | 2020-07-14 09:44:02 +0100 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2020-07-14 09:44:02 +0100 |
| commit | 6c598a53d3366d8ff7250bdc1ce29fa4c36ec246 (patch) | |
| tree | 60b13e5dde965117392b7d15e5eb1e6b406de665 /sort/selection_test.go | |
| parent | aee630b03f48a9f528a4a50e9dcb0fdc8ef20aa5 (diff) | |
better testing
Diffstat (limited to 'sort/selection_test.go')
| -rw-r--r-- | sort/selection_test.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sort/selection_test.go b/sort/selection_test.go index c5d6beb..f432474 100644 --- a/sort/selection_test.go +++ b/sort/selection_test.go @@ -1,7 +1,6 @@ package sort import ( - "algorithms/ds" "testing" ) @@ -11,10 +10,8 @@ func BenchmarkSelection(b *testing.B) { benchmark("Selection", 1000, Selection, b) } -func TestSelection1000(t *testing.T) { - a := ds.RandomIntegers(1000, 1000) - a = Selection(a) - if !Sorted(a) { - t.Errorf("Array not sorted: %v", a) +func TestSelection(t *testing.T) { + for i := 1; i <= 1000; i *= 10 { + test("Selection", i, Selection, t) } } |
