aboutsummaryrefslogtreecommitdiffstats
path: root/prog/heatmap_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-11-22 12:03:55 +0100
committerDmitry Vyukov <dvyukov@google.com>2022-11-23 09:09:39 +0100
commitcaddc6cbcef9933a4539a06714df006e0c5ac7b2 (patch)
treea1c058c702d31527eb9a183f8115f73d6945776b /prog/heatmap_test.go
parent75740b3f90c81d4c226b0e30eec947df4fbd6832 (diff)
pkg/testutil: add RandSource helper
The code to send rand source is dublicated in several packages. Move it to testutil package.
Diffstat (limited to 'prog/heatmap_test.go')
-rw-r--r--prog/heatmap_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/prog/heatmap_test.go b/prog/heatmap_test.go
index cbda3ce43..4103a4f97 100644
--- a/prog/heatmap_test.go
+++ b/prog/heatmap_test.go
@@ -7,6 +7,8 @@ import (
"math/rand"
"sort"
"testing"
+
+ "github.com/google/syzkaller/pkg/testutil"
)
func TestGenericHeatmap(t *testing.T) {
@@ -48,7 +50,7 @@ func TestGenericHeatmap(t *testing.T) {
const tries = 10
iters := iterCount() / tries
- r := rand.New(randSource(t))
+ r := rand.New(testutil.RandSource(t))
for _, test := range testData {
data, err := DecodeB64(test.data)
if err != nil {