]> Cypherpunks repositories - gostls13.git/commit
math/big: ensure correct test input
authorRobert Griesemer <gri@golang.org>
Tue, 12 Nov 2019 17:48:38 +0000 (09:48 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 12 Nov 2019 18:52:52 +0000 (18:52 +0000)
commit1fe33e3cb20295b5120f82b02b0a9ab4ad303cc0
treef266ba16da9392ec7c266aedaecf325671664827
parent8c5dbba01c9e661ca33a0cb1783c10c71d34da8d
math/big: ensure correct test input

There is a (theoretical, but possible) chance that the
random number values a, b used for TestDiv are 0 or 1,
in which case the test would fail.

This CL makes sure that a >= 1 and b >= 2 at all times.

Fixes #35523.

Change-Id: I6451feb94241249516a821cd0066e95a0c65b0ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/206818
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/math/big/nat_test.go