]> pd.if.org Git - pdclib/blobdiff - functions/stdio/vfprintf.c
Switched to tmpfile() where appropriate.
[pdclib] / functions / stdio / vfprintf.c
index 6a5a781861d3506623919fcd9fc0e67ecf6dfc5c..44c86358783e6b13b3ee13d6ef39e8c71c8add0f 100644 (file)
@@ -49,6 +49,8 @@ int vfprintf( struct _PDCLIB_file_t * _PDCLIB_restrict stream, const char * _PDC
 #endif
 
 #ifdef TEST
+#define _PDCLIB_FILEID "stdio/vfprintf.c"
+#define FPRINTF_FUNCTION
 #include <stdlib.h>
 #include <limits.h>
 #include <string.h>
@@ -64,16 +66,12 @@ static int testprintf( FILE * stream, const char * format, ... )
     return i;
 }
 
-#define TESTCASE_SPRINTF( x )
-
 int main( void )
 {
     FILE * target;
-    TESTCASE( ( target = fopen( testfile, "wb" ) ) != NULL );
+    TESTCASE( ( target = tmpfile() ) != NULL );
 #include "printf_testcases.incl"
     TESTCASE( fclose( target ) == 0 );
-#include "fprintf_reftest.incl"
-    TESTCASE( remove( testfile ) == 0 );
     return TEST_RESULTS;
 }