X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fvprintf.c;h=48ad5576e08f150705d40c12ab8e156ee2f0f2f1;hb=33515db12d3cc5e53a8bdea58d2cde299cba2267;hp=2be15c2ad402150b0cfae0fd54bc02b0436c3220;hpb=8d4237204b06cb16cf799c7d28372e3899f8b50a;p=pdclib.old diff --git a/functions/stdio/vprintf.c b/functions/stdio/vprintf.c index 2be15c2..48ad557 100644 --- a/functions/stdio/vprintf.c +++ b/functions/stdio/vprintf.c @@ -19,11 +19,12 @@ int vprintf( const char * _PDCLIB_restrict format, _PDCLIB_va_list arg ) #endif #ifdef TEST -#include -#include +#define _PDCLIB_FILEID "stdio/vprintf.c" +#define _PDCLIB_FILEIO + #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; @@ -35,11 +36,10 @@ static int testprintf( FILE * stream, size_t n, const char * format, ... ) int main( void ) { - FILE * buffer; - TESTCASE( ( buffer = freopen( testfile, "wb", stdout ) ) != NULL ); -#include "printf_testcases.incl" - TESTCASE( fclose( buffer ) == 0 ); -#include "fprintf_reftest.incl" + FILE * target; + TESTCASE( ( target = freopen( testfile, "wb+", stdout ) ) != NULL ); +#include "printf_testcases.h" + TESTCASE( fclose( target ) == 0 ); TESTCASE( remove( testfile ) == 0 ); return TEST_RESULTS; }