X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdio%2Fsnprintf.c;h=cf30e40ef12d7c4630be5d148f83fbbade245c89;hp=a34558992e5b84a717282dc5da67a976cdaeec8b;hb=07810dbd8f3e21618208b923e293715774c80ade;hpb=60e7b4f8e96c76b5b459e062e3b7747bc7055ec2 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 ) {