summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2020-10-29 18:17:57 +0100
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2020-10-29 18:17:57 +0100
commitf185058a4bd52f62745a6813635733637bcd23de (patch)
tree337ff9890e632de28ccf78fed57e4f851f4d4f11 /tests
parent5fe7082202d44dcb5d1e294a02712c41e6a217b9 (diff)
downloadgmp-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.c9
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;