diff options
Diffstat (limited to 'pkg/bst/bst_test.go')
-rw-r--r-- | pkg/bst/bst_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/bst/bst_test.go b/pkg/bst/bst_test.go index f7db68af..4ac9d82f 100644 --- a/pkg/bst/bst_test.go +++ b/pkg/bst/bst_test.go @@ -64,7 +64,7 @@ func BenchmarkBigSearch(b *testing.B) { g2 := NewBST() g3 := NewBST() - var predefinedSlice []string + predefinedSlice := make([]string, 0, 1000) for i := 0; i < 1000; i++ { predefinedSlice = append(predefinedSlice, uuid.NewString()) } @@ -122,7 +122,7 @@ func BenchmarkBigSearchWithRemoves(b *testing.B) { g2 := NewBST() g3 := NewBST() - var predefinedSlice []string + predefinedSlice := make([]string, 0, 1000) for i := 0; i < 1000; i++ { predefinedSlice = append(predefinedSlice, uuid.NewString()) } @@ -157,7 +157,7 @@ func BenchmarkBigSearchWithRemoves(b *testing.B) { for { select { case <-tt.C: - num := rand.Intn(333) + num := rand.Intn(333) //nolint:gosec values := g1.Get(predefinedSlice[num]) for k := range values { g1.Remove(k, predefinedSlice[num]) @@ -275,7 +275,7 @@ func TestBigSearch(t *testing.T) { g2 := NewBST() g3 := NewBST() - var predefinedSlice []string + predefinedSlice := make([]string, 0, 1000) for i := 0; i < 1000; i++ { predefinedSlice = append(predefinedSlice, uuid.NewString()) } @@ -329,7 +329,7 @@ func TestBigSearchWithRemoves(t *testing.T) { g2 := NewBST() g3 := NewBST() - var predefinedSlice []string + predefinedSlice := make([]string, 0, 1000) for i := 0; i < 1000; i++ { predefinedSlice = append(predefinedSlice, uuid.NewString()) } @@ -365,7 +365,7 @@ func TestBigSearchWithRemoves(t *testing.T) { for { select { case <-tt.C: - num := rand.Intn(333) + num := rand.Intn(333) //nolint:gosec values := g1.Get(predefinedSlice[num]) for k := range values { g1.Remove(k, predefinedSlice[num]) |