Reworked scanf() testing. General cleanups.
[fw/pdclib] / functions / stdio / vsnprintf.c
index fd9b4ac3fc34e5cb57477395371164b6536e3eaf..9eb869e78cb2b7dbb52c9eab259b0fba1670283c 100644 (file)
@@ -48,28 +48,25 @@ int vsnprintf( char * _PDCLIB_restrict s, size_t n, const char * _PDCLIB_restric
 #endif
 
 #ifdef TEST
-#include <_PDCLIB_test.h>
+#define _PDCLIB_FILEID "stdio/vsnprintf.c"
+#define _PDCLIB_STRINGIO
 
-#include <limits.h>
-#include <stdint.h>
-#include <string.h>
+#include <_PDCLIB_test.h>
 
-static int testprintf( char * s, size_t n, const char * format, ... )
+static int testprintf( char * s, const char * format, ... )
 {
     int i;
     va_list arg;
     va_start( arg, format );
-    i = vsnprintf( s, n, format, arg );
+    i = vsnprintf( s, 100, format, arg );
     va_end( arg );
     return i;
 }
 
-#define TESTCASE_SPRINTF( x ) TESTCASE( x )
-
 int main( void )
 {
-    char buffer[100];
-#include "printf_testcases.incl"
+    char target[100];
+#include "printf_testcases.h"
     return TEST_RESULTS;
 }