diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2020-10-29 18:17:57 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2020-10-29 18:17:57 +0100 |
commit | f185058a4bd52f62745a6813635733637bcd23de (patch) | |
tree | 337ff9890e632de28ccf78fed57e4f851f4d4f11 /tests | |
parent | 5fe7082202d44dcb5d1e294a02712c41e6a217b9 (diff) | |
download | gmp-f185058a4bd52f62745a6813635733637bcd23de.tar.gz |
tests/mpz/t-get_d.c: Test also the case zero.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mpz/t-get_d.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/mpz/t-get_d.c b/tests/mpz/t-get_d.c index 46e5eafb7..f4c839ffc 100644 --- a/tests/mpz/t-get_d.c +++ b/tests/mpz/t-get_d.c @@ -1,6 +1,6 @@ /* Test mpz_get_d. -Copyright 2002, 2012 Free Software Foundation, Inc. +Copyright 2002, 2012, 2020 Free Software Foundation, Inc. This file is part of the GNU MP Library test suite. @@ -38,6 +38,13 @@ check_onebit (void) mpz_init (z); + got = mpz_get_d (z); + if (got != 0) + { + printf ("mpz_get_d wrong on zero\n"); + abort(); + } + mpz_set_ui (z, 1L); want = 1.0; |