diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-01-05 23:44:07 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-01-05 23:44:07 +0100 |
commit | b2f198d3e1997a4235751006605fc022e8f95d7b (patch) | |
tree | c54c32b699fbcb00585b7e252e94d28a5561fd6f /tests/t-constants.c | |
parent | c5859da03e73213ec6d9adcbceffc5ede57b01f4 (diff) | |
download | gmp-b2f198d3e1997a4235751006605fc022e8f95d7b.tar.gz |
* gmp-impl.h (MP_BASES_CHARS_PER_LIMB_10, MP_BASES_BIG_BASE_10,
MP_BASES_BIG_BASE_INVERTED_10, MP_BASES_NORMALIZATION_STEPS_10): New
constants.
* tests/t-constants.c: Add checks.
Diffstat (limited to 'tests/t-constants.c')
-rw-r--r-- | tests/t-constants.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/t-constants.c b/tests/t-constants.c index cfcb60ba9..0eaaa3a52 100644 --- a/tests/t-constants.c +++ b/tests/t-constants.c @@ -1,6 +1,6 @@ /* Check the values of some constants. -Copyright 2000, 2001 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -264,6 +264,16 @@ main (int argc, char *argv[]) } #endif + /* These defines are supposed to be the same as the table. */ + CHECK_INT (MP_BASES_CHARS_PER_LIMB_10, __mp_bases[10].chars_per_limb); + CHECK_LIMB (MP_BASES_BIG_BASE_10, __mp_bases[10].big_base); + CHECK_LIMB (MP_BASES_BIG_BASE_INVERTED_10, __mp_bases[10].big_base_inverted); + { + int normalization_steps_calc; + count_leading_zeros (normalization_steps_calc, __mp_bases[10].big_base); + CHECK_INT (MP_BASES_NORMALIZATION_STEPS_10, normalization_steps_calc); + } + if (argc >= 2 || error) { int bits; |