mirror of
https://github.com/golang/go
synced 2024-11-21 23:44:39 -07:00
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
This commit is contained in:
parent
3358a5068a
commit
f2f0059307
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user