diff options
author | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-06-20 08:50:47 +0000 |
---|---|---|
committer | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-06-20 08:50:47 +0000 |
commit | d4a15e1e7ca0affc21e211d9a94cc30a7d04da35 (patch) | |
tree | 68f938ddb99c36b65e1690f1febb5022b60532ff /tests/ttrunc.c | |
parent | d61888aa76c9f21a6bfb4ce4a27dbbdd438926e1 (diff) | |
download | mpfr-d4a15e1e7ca0affc21e211d9a94cc30a7d04da35.tar.gz |
Various patches for leaks, UMR and (one) BUS.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@638 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/ttrunc.c')
-rw-r--r-- | tests/ttrunc.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/ttrunc.c b/tests/ttrunc.c index 1a51f95e7..ac449a47f 100644 --- a/tests/ttrunc.c +++ b/tests/ttrunc.c @@ -91,6 +91,13 @@ int main() printf("Error in floor, x = "); mpfr_print_raw(x); printf("\n"); printf("floor(x) = "); mpfr_print_raw(y); printf("\n"); printf("round(x, RNDD) = "); mpfr_print_raw(y2); printf("\n"); + mpfr_clear(x); + mpfr_clear(y); + mpfr_clear(y2); + mpfr_clear(z); + mpfr_clear(z2); + mpfr_clear(t); + mpfr_clear(t2); exit(-1); } @@ -99,6 +106,13 @@ int main() printf("Error in trunc, x = "); mpfr_print_raw(x); printf("\n"); printf("trunc(x) = "); mpfr_print_raw(z); printf("\n"); printf("round(x, RNDZ) = "); mpfr_print_raw(z2); printf("\n"); + mpfr_clear(x); + mpfr_clear(y); + mpfr_clear(y2); + mpfr_clear(z); + mpfr_clear(z2); + mpfr_clear(t); + mpfr_clear(t2); exit(-1); } @@ -107,11 +121,27 @@ int main() printf("Error in ceil, x = "); mpfr_print_raw(x); printf("\n"); printf("ceil(x) = "); mpfr_print_raw(t); printf("\n"); printf("round(x, RNDU) = "); mpfr_print_raw(t2); printf("\n"); + mpfr_clear(x); + mpfr_clear(y); + mpfr_clear(y2); + mpfr_clear(z); + mpfr_clear(z2); + mpfr_clear(t); + mpfr_clear(t2); exit(-1); } EXP(x)++; } } + + mpfr_clear(x); + mpfr_clear(y); + mpfr_clear(y2); + mpfr_clear(z); + mpfr_clear(z2); + mpfr_clear(t); + mpfr_clear(t2); + return 0; } |