From 914e5972bd89405c8262f16d70ff4c6f7b1d7424 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sun, 11 Jun 2023 18:56:35 -0500 Subject: [PATCH] Change tests to account for recent stdio changes in SysFloat. --- Tests/Conformance/C17.11.0.9.CC | 20 ++++++++++---------- Tests/Conformance/C17.8.0.7.CC | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Tests/Conformance/C17.11.0.9.CC b/Tests/Conformance/C17.11.0.9.CC index f2d8ebf..87a6e84 100644 --- a/Tests/Conformance/C17.11.0.9.CC +++ b/Tests/Conformance/C17.11.0.9.CC @@ -35,37 +35,37 @@ int main (void) /* Write formatted output as string to the output files and sstring. */ i = fprintf (f1, " %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1); - if (i != 54) + if (i != 55) goto Fail; i = printf (" %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1); - if (i != 54) + if (i != 55) goto Fail; i = sprintf (sstring, " %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1); - if (i != 54) + if (i != 55) goto Fail; /* Check the string written. */ rewind (f1); - i = fscanf (f1, "%53c", string); + i = fscanf (f1, "%54c", string); if (i != 1) goto Fail3; - string [53] = '\0'; - if (strcmp (string, " +1.2345600000000000e-203 -4.700000E+00 5e+00 E")) + string [54] = '\0'; + if (strcmp (string, " +1.2345600000000000e-203 -4.700000E+00 5.e+00 E")) goto Fail; rewind (stdout); - i = fscanf (stdout, "%53c", string); + i = fscanf (stdout, "%54c", string); if (i != 1) goto Fail3; - string [53] = '\0'; - if (strcmp (string, " +1.2345600000000000e-203 -4.700000E+00 5e+00 E")) + string [54] = '\0'; + if (strcmp (string, " +1.2345600000000000e-203 -4.700000E+00 5.e+00 E")) goto Fail; - if (strcmp (sstring, " +1.2345600000000000e-203 -4.700000E+00 5e+00 E\n")) + if (strcmp (sstring, " +1.2345600000000000e-203 -4.700000E+00 5.e+00 E\n")) goto Fail; diff --git a/Tests/Conformance/C17.8.0.7.CC b/Tests/Conformance/C17.8.0.7.CC index 138669f..3233e3e 100644 --- a/Tests/Conformance/C17.8.0.7.CC +++ b/Tests/Conformance/C17.8.0.7.CC @@ -14,7 +14,7 @@ int main (void) f = fopen ("3/tmp", "wb+"); /* open input file for test */ if (f == NULL) goto Fail1; - fprintf(f, "23 -3.8E20 - e- +25e- 00002.00008e000049.9"); + fprintf(f, "23 -3.8E20 -0 0e-0 +25e-0 00002.00008e000049.9"); rewind(f); f1 = f2 = f3 = f4 = 1.0;