mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 23:29:27 +00:00
22 lines
406 B
C++
22 lines
406 B
C++
/* Deviance Test 17.6.0.2: Ensure illegal parameters for getc are detected */
|
|
|
|
#include <stdio.h>
|
|
|
|
main ()
|
|
{
|
|
FILE *f1;
|
|
int i;
|
|
|
|
i = getc (f1); /* try to read from closed stream */
|
|
if (i != EOF)
|
|
goto Fail;
|
|
if (! (feof (f1)) )
|
|
goto Fail;
|
|
|
|
printf ("Passed Deviance Test 17.6.0.2\n");
|
|
return;
|
|
|
|
Fail:
|
|
printf ("Failed Deviance Test 17.6.0.2\n");
|
|
}
|