X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fsnprintf.c;fp=functions%2Fstdio%2Fsnprintf.c;h=cf30e40ef12d7c4630be5d148f83fbbade245c89;hb=1eca3189422aef89f2f4706a1eb43d045b1985bc;hp=a34558992e5b84a717282dc5da67a976cdaeec8b;hpb=7d8bcd5425ad7ab8974d7b2eec2ca082c33d1286;p=pdclib.old diff --git a/functions/stdio/snprintf.c b/functions/stdio/snprintf.c index a345589..cf30e40 100644 --- a/functions/stdio/snprintf.c +++ b/functions/stdio/snprintf.c @@ -31,7 +31,8 @@ int snprintf( char * _PDCLIB_restrict s, size_t n, const char * _PDCLIB_restrict #define testprintf( s, n, format, ... ) snprintf( s, n, format, __VA_ARGS__ ) -#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 ) {