Change tests to account for recent stdio changes in SysFloat.

This commit is contained in:
Stephen Heumann 2023-06-11 18:56:35 -05:00
parent 79e83c3092
commit 914e5972bd
2 changed files with 11 additions and 11 deletions

View File

@ -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;

View File

@ -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;