projects
/
fw
/
pdclib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reworked scanf() testing. General cleanups.
[fw/pdclib]
/
functions
/
stdio
/
vfscanf.c
diff --git
a/functions/stdio/vfscanf.c
b/functions/stdio/vfscanf.c
index e1c8b4b40efd8fd28040cbf47600647ab0e9e4bb..fbf5356d78673667b741fca010ea4af5cfc9adbe 100644
(file)
--- a/
functions/stdio/vfscanf.c
+++ b/
functions/stdio/vfscanf.c
@@
-88,11
+88,12
@@
int vfscanf( FILE * _PDCLIB_restrict stream, const char * _PDCLIB_restrict forma
#endif
#ifdef TEST
#endif
#ifdef TEST
-#include <_PDCLIB_test.h>
+#define _PDCLIB_FILEID "stdio/vfscanf.c"
+#define _PDCLIB_FILEIO
-#include
"scan_test.h"
+#include
<_PDCLIB_test.h>
-static int
SCANFUNC
( FILE * stream, char const * format, ... )
+static int
testscanf
( FILE * stream, char const * format, ... )
{
va_list ap;
va_start( ap, format );
{
va_list ap;
va_start( ap, format );
@@
-103,8
+104,10
@@
static int SCANFUNC( FILE * stream, char const * format, ... )
int main( void )
{
int main( void )
{
-#include "fscan_sources.incl"
-#include "scanf_testcases.incl"
+ FILE * source;
+ TESTCASE( ( source = tmpfile() ) != NULL );
+#include "scanf_testcases.h"
+ TESTCASE( fclose( source ) == 0 );
return TEST_RESULTS;
}
return TEST_RESULTS;
}