summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-19 08:34:00 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-19 08:34:00 +0000
commitafce48341d8ca14e267e6dd167521170ccc8f90c (patch)
treeb934b4c9b77e8ef07fdcb47766df9ec598fe9b66
parentdb328fa49b02b551da73ad41fde4366d18462823 (diff)
downloadmpfr-afce48341d8ca14e267e6dd167521170ccc8f90c.tar.gz
[tests/tsprintf.c] In mixed(), initialize n2 to an invalid value
in order to ease failure analysis. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11496 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tsprintf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/tsprintf.c b/tests/tsprintf.c
index a2bb09c0b..5d4029744 100644
--- a/tests/tsprintf.c
+++ b/tests/tsprintf.c
@@ -826,6 +826,9 @@ mixed (void)
x);
check_vsprintf ("-12345678.9, 121", "%.1Rf, %i", x, i);
check_vsprintf ("-12345678, 1e240/45b352", "%.0R*f, %Qx", MPFR_RNDZ, x, mpq);
+ n2 = -17;
+ /* If this value is obtained for n2 after the check_vsprintf call below,
+ this probably means that n2 has not been written as expected. */
n1 = check_vsprintf ("121, -12345678.875000000000, 1.290323", "%i, %.*Rf, %Ff%n",
i, 12, x, mpf, &n2);
if (n1 != n2)