diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-05-22 09:22:44 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-05-22 09:22:44 +0000 |
commit | 6aa9f4aef657770e128125f9e98f660e9986626a (patch) | |
tree | a7cbd659b683edcff9871d409bd5cc88c7cd7dd2 /tests/tstdint.c | |
parent | 23a0eb39809df6e8cc8ccc152daf913c13ae4461 (diff) | |
download | mpfr-6aa9f4aef657770e128125f9e98f660e9986626a.tar.gz |
[tests/{tstdint.c,tvalist.c}] Use tests_start_mpfr / tests_end_mpfr,
in particular to detect a wrong MPFR version (due to a libtool bug).
(merged changeset r9447 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@9448 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tstdint.c')
-rw-r--r-- | tests/tstdint.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/tstdint.c b/tests/tstdint.c index d90a3f4e1..16057f5bf 100644 --- a/tests/tstdint.c +++ b/tests/tstdint.c @@ -44,10 +44,19 @@ main (void) mpfr_t x; intmax_t j; + tests_start_mpfr (); + mpfr_init_set_ui (x, 1, MPFR_RNDN); j = mpfr_get_uj (x, MPFR_RNDN); mpfr_clear (x); - return j == 1 ? 0 : 1; + if (j != 1) + { + printf ("Error: got %jd instead of 1.\n", j); + exit (1); + } + + tests_end_mpfr (); + return 0; } #else /* HAVE_STDINT_H */ |