X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fvfprintf.c;h=b5dacb465144555f63330eef9c6b83ea9af8b7ee;hb=eabb2c002a72fcb019ce81a86ba024bd48aceda3;hp=2b216db9ff71b19dec53384c3ab92d2f5b762bbd;hpb=92177644f19b596c593293cb20c4f6677186f3b6;p=pdclib diff --git a/functions/stdio/vfprintf.c b/functions/stdio/vfprintf.c index 2b216db..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; @@ -64,14 +66,12 @@ static int testprintf( FILE * stream, size_t n, const char * format, ... ) return i; } -#define TESTCASE_SPRINTF( x ) - 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;