X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fvfprintf.c;h=b5dacb465144555f63330eef9c6b83ea9af8b7ee;hb=eabb2c002a72fcb019ce81a86ba024bd48aceda3;hp=01c5df618cedc0021dd826ed7a4323a56b671d4c;hpb=55cf35957bf8dec0a489ba758c02c83303a5eb50;p=pdclib diff --git a/functions/stdio/vfprintf.c b/functions/stdio/vfprintf.c index 01c5df6..b5dacb4 100644 --- a/functions/stdio/vfprintf.c +++ b/functions/stdio/vfprintf.c @@ -49,12 +49,14 @@ 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 #include #include #include <_PDCLIB_test.h> -static int testprintf( FILE * stream, size_t n, const char * format, ... ) +static int testprintf( FILE * stream, const char * format, ... ) { int i; va_list arg; @@ -66,10 +68,10 @@ static int testprintf( FILE * stream, size_t n, const char * format, ... ) int main( void ) { - FILE * buffer; - TESTCASE( ( buffer = fopen( testfile, "wb" ) ) != NULL ); + FILE * target; + TESTCASE( ( target = fopen( testfile, "wb+" ) ) != NULL ); #include "printf_testcases.incl" - TESTCASE( fclose( buffer ) == 0 ); + TESTCASE( fclose( target ) == 0 ); #include "fprintf_reftest.incl" TESTCASE( remove( testfile ) == 0 ); return TEST_RESULTS;