summaryrefslogtreecommitdiff
path: root/tests/mpn
diff options
context:
space:
mode:
authorNiels M?ller <nisse@lysator.liu.se>2019-08-16 08:09:57 +0200
committerNiels M?ller <nisse@lysator.liu.se>2019-08-16 08:09:57 +0200
commitc6fa69d38787f4b2dbfcf89ed46c133f87c87728 (patch)
tree8faae2563a9648235646573c35793febfb86a981 /tests/mpn
parent694d0c60b43d40bd18bcf5dda6ba1181cedd1324 (diff)
downloadgmp-c6fa69d38787f4b2dbfcf89ed46c133f87c87728.tar.gz
Use independent input sizes for gcd_11 and gcd_22 tests.
Diffstat (limited to 'tests/mpn')
-rw-r--r--tests/mpn/t-gcd_11.c11
-rw-r--r--tests/mpn/t-gcd_22.c11
2 files changed, 12 insertions, 10 deletions
diff --git a/tests/mpn/t-gcd_11.c b/tests/mpn/t-gcd_11.c
index c673ea2b4..117163224 100644
--- a/tests/mpn/t-gcd_11.c
+++ b/tests/mpn/t-gcd_11.c
@@ -58,16 +58,17 @@ main (int argc, char **argv)
for (test = 0; test < count; test++)
{
mp_limb_t al, bl;
- mp_bitcnt_t size = 1 + gmp_urandomm_ui(rands, GMP_NUMB_BITS);
+ mp_bitcnt_t asize = 1 + gmp_urandomm_ui(rands, GMP_NUMB_BITS);
+ mp_bitcnt_t bsize = 1 + gmp_urandomm_ui(rands, GMP_NUMB_BITS);
if (test & 1)
{
- mpz_urandomb (a, rands, size);
- mpz_urandomb (b, rands, size);
+ mpz_urandomb (a, rands, asize);
+ mpz_urandomb (b, rands, bsize);
}
else
{
- mpz_rrandomb (a, rands, size);
- mpz_rrandomb (b, rands, size);
+ mpz_rrandomb (a, rands, asize);
+ mpz_rrandomb (b, rands, bsize);
}
mpz_setbit (a, 0);
diff --git a/tests/mpn/t-gcd_22.c b/tests/mpn/t-gcd_22.c
index 4761680c9..19e3335d7 100644
--- a/tests/mpn/t-gcd_22.c
+++ b/tests/mpn/t-gcd_22.c
@@ -59,16 +59,17 @@ main (int argc, char **argv)
mpz_init (ref);
for (test = 0; test < count; test++)
{
- mp_bitcnt_t size = 1 + gmp_urandomm_ui(rands, 2*GMP_NUMB_BITS);
+ mp_bitcnt_t asize = 1 + gmp_urandomm_ui(rands, 2*GMP_NUMB_BITS);
+ mp_bitcnt_t bsize = 1 + gmp_urandomm_ui(rands, 2*GMP_NUMB_BITS);
if (test & 1)
{
- mpz_urandomb (a, rands, size);
- mpz_urandomb (b, rands, size);
+ mpz_urandomb (a, rands, asize);
+ mpz_urandomb (b, rands, bsize);
}
else
{
- mpz_rrandomb (a, rands, size);
- mpz_rrandomb (b, rands, size);
+ mpz_rrandomb (a, rands, asize);
+ mpz_rrandomb (b, rands, bsize);
}
mpz_setbit (a, 0);