#endif
#ifdef TEST
-#include <_PDCLIB_test.h>
-
-#include <string.h>
-#include <limits.h>
+#define _PDCLIB_FILEID "stdio/sprintf.c"
+#define _PDCLIB_STRINGIO
-#define testprintf( s, n, format, ... ) sprintf( s, format, __VA_ARGS__ )
+#include <_PDCLIB_test.h>
-#define TESTCASE_SPRINTF( x ) if ( strcmp( buffer, x ) == 0 ) {} \
- else { TEST_RESULTS += 1; printf( "FAILED: " __FILE__ ", line %d - \"%s\" != %s\n", __LINE__, buffer, #x ); }
+#define testprintf( s, ... ) sprintf( s, __VA_ARGS__ )
int main( void )
{
- char buffer[100];
-#include "printf_testcases.incl"
+ char target[100];
+#include "printf_testcases.h"
return TEST_RESULTS;
}