summaryrefslogtreecommitdiff
path: root/tests/tfpif.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-03-29 08:08:58 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-03-29 08:08:58 +0000
commit6438325debc63d9b1dddea2392ce88928ca266bd (patch)
tree1456042314a8e4fa027dcc3986827941d6a817a6 /tests/tfpif.c
parent15303545008037b78cdfeb148752bdb79e492779 (diff)
downloadmpfr-6438325debc63d9b1dddea2392ce88928ca266bd.tar.gz
[tests/tfpif.c] Fixed a test: for the huge-precision badData case,
make sure that the data are valid so that we really check that the precision does not fit (and not a read error). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12504 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tfpif.c')
-rw-r--r--tests/tfpif.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/tfpif.c b/tests/tfpif.c
index 4c2b8e2b9..f1fcca8df 100644
--- a/tests/tfpif.c
+++ b/tests/tfpif.c
@@ -202,9 +202,10 @@ check_bad (void)
int status;
FILE *fh;
mpfr_t x;
- unsigned char badData[BAD][9] =
+ unsigned char badData[BAD][10] =
{ { 7 }, { 16 }, { 23, 118 }, { 23, 95 }, { 23, 127 }, { 23, 47 },
- { 7, 0, 0, 0, 0, 0, 0, 0, 128 } };
+ { 7, 0, 0, 0, 0, 0, 0, 0, 128, 119 } /* +0 in a huge precision */
+ };
int badDataSize[BAD] = { 1, 1, 2, 2, 2, 2, 9 };
int i;