From: Josh Bleecher Snyder Date: Sat, 29 Jul 2017 14:25:39 +0000 (-0700) Subject: math/rand: use t.Helper in tests X-Git-Tag: go1.10beta1~1696 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6b53dd4f2b3a30b010f3c0cc5dabc8a7ad896c15;p=gostls13.git math/rand: use t.Helper in tests Change-Id: Iece39e6412c0f6c63f563eed1621b8cca02de835 Reviewed-on: https://go-review.googlesource.com/51890 Run-TryBot: Josh Bleecher Snyder Run-TryBot: Brad Fitzpatrick Reviewed-by: Brad Fitzpatrick Reviewed-by: Avelino TryBot-Result: Gobot Gobot --- diff --git a/src/math/rand/rand_test.go b/src/math/rand/rand_test.go index 55d2902c69..da065159d9 100644 --- a/src/math/rand/rand_test.go +++ b/src/math/rand/rand_test.go @@ -74,6 +74,7 @@ func getStatsResults(samples []float64) *statsResults { } func checkSampleDistribution(t *testing.T, samples []float64, expected *statsResults) { + t.Helper() actual := getStatsResults(samples) err := actual.checkSimilarDistribution(expected) if err != nil { @@ -82,6 +83,7 @@ func checkSampleDistribution(t *testing.T, samples []float64, expected *statsRes } func checkSampleSliceDistributions(t *testing.T, samples []float64, nslices int, expected *statsResults) { + t.Helper() chunk := len(samples) / nslices for i := 0; i < nslices; i++ { low := i * chunk