mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-02-21 12:29:00 +00:00
Change tests to account for recent stdio changes in SysFloat.
This commit is contained in:
parent
79e83c3092
commit
914e5972bd
@ -35,37 +35,37 @@ int main (void)
|
|||||||
/* Write formatted output as string to the output files and sstring. */
|
/* 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);
|
i = fprintf (f1, " %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1);
|
||||||
if (i != 54)
|
if (i != 55)
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
i = printf (" %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1);
|
i = printf (" %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1);
|
||||||
if (i != 54)
|
if (i != 55)
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
i = sprintf (sstring, " %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1);
|
i = sprintf (sstring, " %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1);
|
||||||
if (i != 54)
|
if (i != 55)
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
|
|
||||||
/* Check the string written. */
|
/* Check the string written. */
|
||||||
|
|
||||||
rewind (f1);
|
rewind (f1);
|
||||||
i = fscanf (f1, "%53c", string);
|
i = fscanf (f1, "%54c", string);
|
||||||
if (i != 1)
|
if (i != 1)
|
||||||
goto Fail3;
|
goto Fail3;
|
||||||
string [53] = '\0';
|
string [54] = '\0';
|
||||||
if (strcmp (string, " +1.2345600000000000e-203 -4.700000E+00 5e+00 E"))
|
if (strcmp (string, " +1.2345600000000000e-203 -4.700000E+00 5.e+00 E"))
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
rewind (stdout);
|
rewind (stdout);
|
||||||
i = fscanf (stdout, "%53c", string);
|
i = fscanf (stdout, "%54c", string);
|
||||||
if (i != 1)
|
if (i != 1)
|
||||||
goto Fail3;
|
goto Fail3;
|
||||||
string [53] = '\0';
|
string [54] = '\0';
|
||||||
if (strcmp (string, " +1.2345600000000000e-203 -4.700000E+00 5e+00 E"))
|
if (strcmp (string, " +1.2345600000000000e-203 -4.700000E+00 5.e+00 E"))
|
||||||
goto Fail;
|
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;
|
goto Fail;
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ int main (void)
|
|||||||
f = fopen ("3/tmp", "wb+"); /* open input file for test */
|
f = fopen ("3/tmp", "wb+"); /* open input file for test */
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
goto Fail1;
|
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);
|
rewind(f);
|
||||||
|
|
||||||
f1 = f2 = f3 = f4 = 1.0;
|
f1 = f2 = f3 = f4 = 1.0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user