Commit f2f00593 authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

math/rand: decrease test duration in short mode

TestNonStandardNormalValues runs 1.5s,
the change reduces it to 0.2s in short mode.
The problem is with slow machines, emulators and dynamic tools.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5540065
parent 3358a506
......@@ -131,8 +131,14 @@ func TestStandardNormalValues(t *testing.T) {
}
func TestNonStandardNormalValues(t *testing.T) {
for sd := 0.5; sd < 1000; sd *= 2 {
for m := 0.5; m < 1000; m *= 2 {
sdmax := 1000.0
mmax := 1000.0
if testing.Short() {
sdmax = 5
mmax = 5
}
for sd := 0.5; sd < sdmax; sd *= 2 {
for m := 0.5; m < mmax; m *= 2 {
for _, seed := range testSeeds {
testNormalDistribution(t, numTestSamples, m, sd, seed)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment