Commit 6b53dd4f authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

math/rand: use t.Helper in tests

Change-Id: Iece39e6412c0f6c63f563eed1621b8cca02de835
Reviewed-on: https://go-review.googlesource.com/51890
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: 's avatarAvelino <t@avelino.xxx>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent ca19f2fc
......@@ -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
......
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