diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-05-24 10:00:00 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-05-24 10:00:00 +0000 |
commit | 9998405a673ed3daa293fd35085b9f3f2b62b883 (patch) | |
tree | 20daef2ade79bdb0f160d53e3eb266b725bdc7a1 /tests/tfpif.c | |
parent | 831356748e9f554b9943a8da6ffae0a7dff4c8f3 (diff) | |
download | mpfr-9998405a673ed3daa293fd35085b9f3f2b62b883.tar.gz |
[tests/tfpif.c] Correction on r10338: use src_fopen instead of fopen
and check fp (just like with FILE_NAME_R).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10342 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tfpif.c')
-rw-r--r-- | tests/tfpif.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/tfpif.c b/tests/tfpif.c index 907cf0a53..f2df70b34 100644 --- a/tests/tfpif.c +++ b/tests/tfpif.c @@ -241,13 +241,19 @@ doit (int argc, char *argv[], mpfr_prec_t p1, mpfr_prec_t p2) static void extra (void) { + char *data = FILE_NAME_R2; mpfr_t x; FILE *fp; int ret; mpfr_init2 (x, 17); mpfr_set_ui (x, 42, MPFR_RNDN); - fp = fopen (FILE_NAME_R2, "r"); + fp = src_fopen (data, "r"); + if (fp == NULL) + { + printf ("Failed to open for reading %s in srcdir, exiting...\n", data); + exit (1); + } ret = mpfr_fpif_import (x, fp); MPFR_ASSERTN(ret != 0); MPFR_ASSERTN(mpfr_get_prec (x) == 17); |