mirror of
https://github.com/golang/go
synced 2024-09-06 00:19:45 +00:00
math/rand, math/rand/v2: rename receiver variables
According to the https://go.dev/wiki/CodeReviewComments#receiver-names Change-Id: Ib8bc57cf6a680e5c75d7346b74e77847945f6939 Reviewed-on: https://go-review.googlesource.com/c/go/+/568635 Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
63c910a670
commit
806ea41fce
|
@ -46,14 +46,14 @@ var testSeeds = []int64{1, 1754801282, 1698661970, 1550503961}
|
|||
|
||||
// checkSimilarDistribution returns success if the mean and stddev of the
|
||||
// two statsResults are similar.
|
||||
func (this *statsResults) checkSimilarDistribution(expected *statsResults) error {
|
||||
if !nearEqual(this.mean, expected.mean, expected.closeEnough, expected.maxError) {
|
||||
s := fmt.Sprintf("mean %v != %v (allowed error %v, %v)", this.mean, expected.mean, expected.closeEnough, expected.maxError)
|
||||
func (sr *statsResults) checkSimilarDistribution(expected *statsResults) error {
|
||||
if !nearEqual(sr.mean, expected.mean, expected.closeEnough, expected.maxError) {
|
||||
s := fmt.Sprintf("mean %v != %v (allowed error %v, %v)", sr.mean, expected.mean, expected.closeEnough, expected.maxError)
|
||||
fmt.Println(s)
|
||||
return errors.New(s)
|
||||
}
|
||||
if !nearEqual(this.stddev, expected.stddev, expected.closeEnough, expected.maxError) {
|
||||
s := fmt.Sprintf("stddev %v != %v (allowed error %v, %v)", this.stddev, expected.stddev, expected.closeEnough, expected.maxError)
|
||||
if !nearEqual(sr.stddev, expected.stddev, expected.closeEnough, expected.maxError) {
|
||||
s := fmt.Sprintf("stddev %v != %v (allowed error %v, %v)", sr.stddev, expected.stddev, expected.closeEnough, expected.maxError)
|
||||
fmt.Println(s)
|
||||
return errors.New(s)
|
||||
}
|
||||
|
|
|
@ -50,14 +50,14 @@ var testSeeds = []uint64{1, 1754801282, 1698661970, 1550503961}
|
|||
|
||||
// checkSimilarDistribution returns success if the mean and stddev of the
|
||||
// two statsResults are similar.
|
||||
func (this *statsResults) checkSimilarDistribution(expected *statsResults) error {
|
||||
if !nearEqual(this.mean, expected.mean, expected.closeEnough, expected.maxError) {
|
||||
s := fmt.Sprintf("mean %v != %v (allowed error %v, %v)", this.mean, expected.mean, expected.closeEnough, expected.maxError)
|
||||
func (sr *statsResults) checkSimilarDistribution(expected *statsResults) error {
|
||||
if !nearEqual(sr.mean, expected.mean, expected.closeEnough, expected.maxError) {
|
||||
s := fmt.Sprintf("mean %v != %v (allowed error %v, %v)", sr.mean, expected.mean, expected.closeEnough, expected.maxError)
|
||||
fmt.Println(s)
|
||||
return errors.New(s)
|
||||
}
|
||||
if !nearEqual(this.stddev, expected.stddev, expected.closeEnough, expected.maxError) {
|
||||
s := fmt.Sprintf("stddev %v != %v (allowed error %v, %v)", this.stddev, expected.stddev, expected.closeEnough, expected.maxError)
|
||||
if !nearEqual(sr.stddev, expected.stddev, expected.closeEnough, expected.maxError) {
|
||||
s := fmt.Sprintf("stddev %v != %v (allowed error %v, %v)", sr.stddev, expected.stddev, expected.closeEnough, expected.maxError)
|
||||
fmt.Println(s)
|
||||
return errors.New(s)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue