Modify winetest_ok to only add a trailing '\n' if there is none.

Modify macros in the kernel, oleaut32 and user tests to print a '\n'.
oldstable
Francois Gouget 2003-09-11 01:07:19 +00:00 committed by Alexandre Julliard
parent ee069f7cad
commit 68ea3623b8
4 changed files with 13 additions and 8 deletions

View File

@ -29,7 +29,7 @@
#include "winnls.h"
#define eq(received, expected, label, type) \
ok((received) == (expected), "%s: got " type " instead of " type, (label),(received),(expected))
ok((received) == (expected), "%s: got " type " instead of " type "\n", (label),(received),(expected))
#define BUFFER_SIZE 128
/* Buffer used by callback function */

View File

@ -1761,8 +1761,8 @@ START_TEST(vartest)
*/
trace( "======== Testing VarUI1FromXXX ========\n");
#define XOK "should return S_OK"
#define XOV "should return DISP_E_OVERFLOW"
#define XOK "should return S_OK\n"
#define XOV "should return DISP_E_OVERFLOW\n"
/* Crashes on Win95: VarUI1FromI2( 0, NULL ) */
ok(VarUI1FromStr(NULL, lcid, 0, pByte) == DISP_E_TYPEMISMATCH,"should return DISP_E_TYPEMISMATCH");

View File

@ -35,7 +35,7 @@
static int strict;
#define eq(received, expected, label, type) \
ok((received) == (expected), "%s: got " type " instead of " type, (label),(received),(expected))
ok((received) == (expected), "%s: got " type " instead of " type "\n", (label),(received),(expected))
#define SPI_SETBEEP_REGKEY "Control Panel\\Sound"

View File

@ -156,6 +156,7 @@ void winetest_set_location( const char* file, int line )
int winetest_ok( int condition, const char *msg, ... )
{
va_list valist;
int len;
tls_data* data=get_tls_data();
if (data->todo_level)
@ -164,14 +165,16 @@ int winetest_ok( int condition, const char *msg, ... )
{
fprintf( stdout, "%s:%d: Test succeeded inside todo block",
data->current_file, data->current_line );
if (msg && msg[0])
if (msg[0])
{
va_start(valist, msg);
fprintf(stdout,": ");
vfprintf(stdout, msg, valist);
va_end(valist);
}
fputc( '\n', stdout );
len=strlen(msg);
if (len==0 || msg[len-1]!='\n')
fputc( '\n', stdout );
InterlockedIncrement(&todo_failures);
return 0;
}
@ -183,14 +186,16 @@ int winetest_ok( int condition, const char *msg, ... )
{
fprintf( stdout, "%s:%d: Test failed",
data->current_file, data->current_line );
if (msg && msg[0])
if (msg[0])
{
va_start(valist, msg);
fprintf( stdout,": ");
vfprintf(stdout, msg, valist);
va_end(valist);
}
fputc( '\n', stdout );
len=strlen(msg);
if (len==0 || msg[len-1]!='\n')
fputc( '\n', stdout );
InterlockedIncrement(&failures);
return 0;
}