[Gmp-commit] /var/hg/gmp-5.0: Omit urandomb tests.
mercurial at gmplib.org
mercurial at gmplib.org
Mon Feb 6 11:13:00 CET 2012
details: /var/hg/gmp-5.0/rev/ec2c2959dc8c
changeset: 13547:ec2c2959dc8c
user: Niels M?ller <nisse at lysator.liu.se>
date: Mon Feb 06 11:12:41 2012 +0100
description:
Omit urandomb tests.
diffstat:
ChangeLog | 5 +++++
tests/mpn/t-hgcd.c | 15 ---------------
tests/mpz/t-gcd.c | 24 ------------------------
3 files changed, 5 insertions(+), 39 deletions(-)
diffs (71 lines):
diff -r ce65a74bea1a -r ec2c2959dc8c ChangeLog
--- a/ChangeLog Sun Feb 05 23:29:16 2012 +0100
+++ b/ChangeLog Mon Feb 06 11:12:41 2012 +0100
@@ -1,3 +1,8 @@
+2012-02-06 Niels Möller <nisse at lysator.liu.se>
+
+ * tests/mpz/t-gcd.c (main): Omit tests with urandomb operands.
+ * tests/mpn/t-hgcd.c (main): Likewise.
+
2012-02-05 Niels Möller <nisse at lysator.liu.se>
* tests/mpz/t-gcd.c (main): Add tests with rrandomb operands.
diff -r ce65a74bea1a -r ec2c2959dc8c tests/mpn/t-hgcd.c
--- a/tests/mpn/t-hgcd.c Sun Feb 05 23:29:16 2012 +0100
+++ b/tests/mpn/t-hgcd.c Mon Feb 06 11:12:41 2012 +0100
@@ -105,21 +105,6 @@
size_range = mpz_get_ui (bs) % 13 + 2;
mpz_urandomb (bs, rands, size_range);
- mpz_urandomb (op1, rands, mpz_get_ui (bs) + MIN_OPERAND_SIZE);
- mpz_urandomb (bs, rands, size_range);
- mpz_urandomb (op2, rands, mpz_get_ui (bs) + MIN_OPERAND_SIZE);
-
- if (mpz_cmp (op1, op2) < 0)
- mpz_swap (op1, op2);
-
- if (mpz_size (op1) > 0)
- one_test (op1, op2, i);
-
- /* And with rrandomb */
- mpz_urandomb (bs, rands, 32);
- size_range = mpz_get_ui (bs) % 13 + 2;
-
- mpz_urandomb (bs, rands, size_range);
mpz_rrandomb (op1, rands, mpz_get_ui (bs) + MIN_OPERAND_SIZE);
mpz_urandomb (bs, rands, size_range);
mpz_rrandomb (op2, rands, mpz_get_ui (bs) + MIN_OPERAND_SIZE);
diff -r ce65a74bea1a -r ec2c2959dc8c tests/mpz/t-gcd.c
--- a/tests/mpz/t-gcd.c Sun Feb 05 23:29:16 2012 +0100
+++ b/tests/mpz/t-gcd.c Mon Feb 06 11:12:41 2012 +0100
@@ -154,30 +154,6 @@
size_range = mpz_get_ui (bs) % 17 + 2;
mpz_urandomb (bs, rands, size_range);
- mpz_urandomb (op1, rands, mpz_get_ui (bs) + MIN_OPERAND_BITSIZE);
- mpz_urandomb (bs, rands, size_range);
- mpz_urandomb (op2, rands, mpz_get_ui (bs) + MIN_OPERAND_BITSIZE);
-
- mpz_urandomb (bs, rands, 8);
- bsi = mpz_get_ui (bs);
-
- if ((bsi & 0x3c) == 4)
- mpz_mul (op1, op1, op2); /* make op1 a multiple of op2 */
- else if ((bsi & 0x3c) == 8)
- mpz_mul (op2, op1, op2); /* make op2 a multiple of op1 */
-
- if ((bsi & 1) != 0)
- mpz_neg (op1, op1);
- if ((bsi & 2) != 0)
- mpz_neg (op2, op2);
-
- one_test (op1, op2, NULL, i);
-
- /* And rrandomb inputs have triggered other bugs. */
- mpz_urandomb (bs, rands, 32);
- size_range = mpz_get_ui (bs) % 17 + 2;
-
- mpz_urandomb (bs, rands, size_range);
mpz_rrandomb (op1, rands, mpz_get_ui (bs) + MIN_OPERAND_BITSIZE);
mpz_urandomb (bs, rands, size_range);
mpz_rrandomb (op2, rands, mpz_get_ui (bs) + MIN_OPERAND_BITSIZE);
More information about the gmp-commit
mailing list