@@ -337,10 +337,10 @@ func TestBoolArrayValue(t *testing.T) {
337337}
338338
339339func BenchmarkBoolArrayValue (b * testing.B ) {
340- rand .Seed ( 1 )
340+ rnd := rand .New ( rand . NewSource ( 1 ) )
341341 x := make ([]bool , 10 )
342342 for i := 0 ; i < len (x ); i ++ {
343- x [i ] = rand .Intn (2 ) == 0
343+ x [i ] = rnd .Intn (2 ) == 0
344344 }
345345 a := BoolArray (x )
346346
@@ -488,12 +488,12 @@ func TestByteaArrayValue(t *testing.T) {
488488}
489489
490490func BenchmarkByteaArrayValue (b * testing.B ) {
491- rand .Seed ( 1 )
491+ rnd := rand .New ( rand . NewSource ( 1 ) )
492492 x := make ([][]byte , 10 )
493493 for i := 0 ; i < len (x ); i ++ {
494494 x [i ] = make ([]byte , len (x ))
495495 for j := 0 ; j < len (x ); j ++ {
496- x [i ][j ] = byte (rand .Int ())
496+ x [i ][j ] = byte (rnd .Int ())
497497 }
498498 }
499499 a := ByteaArray (x )
@@ -645,10 +645,10 @@ func TestFloat64ArrayValue(t *testing.T) {
645645}
646646
647647func BenchmarkFloat64ArrayValue (b * testing.B ) {
648- rand .Seed ( 1 )
648+ rnd := rand .New ( rand . NewSource ( 1 ) )
649649 x := make ([]float64 , 10 )
650650 for i := 0 ; i < len (x ); i ++ {
651- x [i ] = rand .NormFloat64 ()
651+ x [i ] = rnd .NormFloat64 ()
652652 }
653653 a := Float64Array (x )
654654
@@ -798,10 +798,10 @@ func TestInt64ArrayValue(t *testing.T) {
798798}
799799
800800func BenchmarkInt64ArrayValue (b * testing.B ) {
801- rand .Seed ( 1 )
801+ rnd := rand .New ( rand . NewSource ( 1 ) )
802802 x := make ([]int64 , 10 )
803803 for i := 0 ; i < len (x ); i ++ {
804- x [i ] = rand .Int63 ()
804+ x [i ] = rnd .Int63 ()
805805 }
806806 a := Int64Array (x )
807807
@@ -952,10 +952,10 @@ func TestFloat32ArrayValue(t *testing.T) {
952952}
953953
954954func BenchmarkFloat32ArrayValue (b * testing.B ) {
955- rand .Seed ( 1 )
955+ rnd := rand .New ( rand . NewSource ( 1 ) )
956956 x := make ([]float32 , 10 )
957957 for i := 0 ; i < len (x ); i ++ {
958- x [i ] = rand .Float32 ()
958+ x [i ] = rnd .Float32 ()
959959 }
960960 a := Float32Array (x )
961961
@@ -1105,10 +1105,10 @@ func TestInt32ArrayValue(t *testing.T) {
11051105}
11061106
11071107func BenchmarkInt32ArrayValue (b * testing.B ) {
1108- rand .Seed ( 1 )
1108+ rnd := rand .New ( rand . NewSource ( 1 ) )
11091109 x := make ([]int32 , 10 )
11101110 for i := 0 ; i < len (x ); i ++ {
1111- x [i ] = rand .Int31 ()
1111+ x [i ] = rnd .Int31 ()
11121112 }
11131113 a := Int32Array (x )
11141114
@@ -1545,10 +1545,10 @@ func TestGenericArrayValueErrors(t *testing.T) {
15451545}
15461546
15471547func BenchmarkGenericArrayValueBools (b * testing.B ) {
1548- rand .Seed ( 1 )
1548+ rnd := rand .New ( rand . NewSource ( 1 ) )
15491549 x := make ([]bool , 10 )
15501550 for i := 0 ; i < len (x ); i ++ {
1551- x [i ] = rand .Intn (2 ) == 0
1551+ x [i ] = rnd .Intn (2 ) == 0
15521552 }
15531553 a := GenericArray {x }
15541554
@@ -1558,10 +1558,10 @@ func BenchmarkGenericArrayValueBools(b *testing.B) {
15581558}
15591559
15601560func BenchmarkGenericArrayValueFloat64s (b * testing.B ) {
1561- rand .Seed ( 1 )
1561+ rnd := rand .New ( rand . NewSource ( 1 ) )
15621562 x := make ([]float64 , 10 )
15631563 for i := 0 ; i < len (x ); i ++ {
1564- x [i ] = rand .NormFloat64 ()
1564+ x [i ] = rnd .NormFloat64 ()
15651565 }
15661566 a := GenericArray {x }
15671567
@@ -1571,10 +1571,10 @@ func BenchmarkGenericArrayValueFloat64s(b *testing.B) {
15711571}
15721572
15731573func BenchmarkGenericArrayValueInt64s (b * testing.B ) {
1574- rand .Seed ( 1 )
1574+ rnd := rand .New ( rand . NewSource ( 1 ) )
15751575 x := make ([]int64 , 10 )
15761576 for i := 0 ; i < len (x ); i ++ {
1577- x [i ] = rand .Int63 ()
1577+ x [i ] = rnd .Int63 ()
15781578 }
15791579 a := GenericArray {x }
15801580
0 commit comments