]> pd.if.org Git - pdclib/blobdiff - functions/_PDCLIB/print.c
Improved reporting by printf tests.
[pdclib] / functions / _PDCLIB / print.c
index 3e48f2ad6569a9998d2c9d8ecfb8e961f055a497..27b4bc26bab9b587ec755b6962d3be03eaa95e75 100644 (file)
@@ -538,7 +538,8 @@ static int testprintf( char * buffer, size_t n, const char * format, ... )
 
 #define TEST_CONVERSION_ONLY
 
-#define TESTCASE_SPRINTF( x ) TESTCASE( x )
+#define TESTCASE_SPRINTF( x ) if ( strcmp( buffer, x ) == 0 ) {} \
+                              else { TEST_RESULTS += 1; printf( "FAILED: " __FILE__ ", line %d - \"%s\" != %s\n", __LINE__, buffer, #x ); }
 
 int main( void )
 {