From abe65e321ec2ec1d5fa93c7b2cfcbc3343570ba1 Mon Sep 17 00:00:00 2001 From: wbhart Date: Sun, 13 Jul 2008 20:13:35 +0000 Subject: [PATCH] Patch to deal properly with 1 nail bits in mpz_set_si test. --- tests/mpz/t-set_si.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/mpz/t-set_si.c b/tests/mpz/t-set_si.c index ac8fa8ec..16512985 100644 --- a/tests/mpz/t-set_si.c +++ b/tests/mpz/t-set_si.c @@ -45,13 +45,17 @@ check_data (void) { 1L, 1, { 1 } }, { -1L, -1, { 1 } }, -#if GMP_NUMB_BITS >= BITS_PER_ULONG +#if GMP_NUMB_BITS >= BITS_PER_ULONG - 1 { LONG_MAX, 1, { LONG_MAX, 0 } }, { -LONG_MAX, -1, { LONG_MAX, 0 } }, - { LONG_HIGHBIT, -1, { ULONG_HIGHBIT, 0 } }, #else { LONG_MAX, 2, { LONG_MAX & GMP_NUMB_MASK, LONG_MAX >> GMP_NUMB_BITS } }, - { -LONG_MAX, -2, { LONG_MAX & GMP_NUMB_MASK, LONG_MAX >> GMP_NUMB_BITS }}, + { -LONG_MAX, -2, { LONG_MAX & GMP_NUMB_MASK, LONG_MAX >> GMP_NUMB_BITS } }, +#endif + +#if GMP_NUMB_BITS >= BITS_PER_ULONG + { LONG_HIGHBIT, -1, { ULONG_HIGHBIT, 0 } }, +#else { LONG_HIGHBIT, -2, { 0, ULONG_HIGHBIT >> GMP_NUMB_BITS } }, #endif };