]> pd.if.org Git - pdclib.old/blobdiff - functions/stdio/snprintf.c
PDCLIB-6: Incorporate the Tyndur test suite into our printf test suite (see included...
[pdclib.old] / functions / stdio / snprintf.c
index 6dd39671fdf33647fb4b5d97f9022c3dad547372..564436a2612d9f22141a246a5856eba471bb3cab 100644 (file)
@@ -29,12 +29,14 @@ int snprintf( char * _PDCLIB_restrict s, size_t n, const char * _PDCLIB_restrict
 
 #include <_PDCLIB_test.h>
 
-#define testprintf( s, format, ... ) snprintf( s, 100, format, __VA_ARGS__ )
+#define testprintf( s, ... ) snprintf( s, 100, __VA_ARGS__ )
 
 int main( void )
 {
     char target[100];
 #include "printf_testcases.h"
+    TESTCASE( snprintf( NULL, 0, "foo" ) == 3 );
+    TESTCASE( snprintf( NULL, 0, "%d", 100 ) == 3 );
     return TEST_RESULTS;
 }