summaryrefslogtreecommitdiff
path: root/libgo/go/math/rand/rand_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/math/rand/rand_test.go')
-rw-r--r--libgo/go/math/rand/rand_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/libgo/go/math/rand/rand_test.go b/libgo/go/math/rand/rand_test.go
index e037aaed0ea..462de8b73b4 100644
--- a/libgo/go/math/rand/rand_test.go
+++ b/libgo/go/math/rand/rand_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package rand
+package rand_test
import (
"bytes"
@@ -11,6 +11,7 @@ import (
"internal/testenv"
"io"
"math"
+ . "math/rand"
"os"
"runtime"
"testing"
@@ -21,6 +22,9 @@ const (
numTestSamples = 10000
)
+var rn, kn, wn, fn = GetNormalDistributionParameters()
+var re, ke, we, fe = GetExponentialDistributionParameters()
+
type statsResults struct {
mean float64
stddev float64
@@ -503,7 +507,7 @@ func TestUniformFactorial(t *testing.T) {
fn func() int
}{
{name: "Int31n", fn: func() int { return int(r.Int31n(int32(nfact))) }},
- {name: "int31n", fn: func() int { return int(r.int31n(int32(nfact))) }},
+ {name: "int31n", fn: func() int { return int(Int31nForTest(r, int32(nfact))) }},
{name: "Perm", fn: func() int { return encodePerm(r.Perm(n)) }},
{name: "Shuffle", fn: func() int {
// Generate permutation using Shuffle.