Add trailing '\n's to ok() calls (kernel 1)
Francois Gouget
fgouget at free.fr
Wed Jan 21 18:30:59 CST 2004
Changelog:
* dlls/kernel/tests/atom.c,
dlls/kernel/tests/codepage.c
Add trailing '\n's to ok() calls.
Index: dlls/kernel/tests/atom.c
===================================================================
RCS file: /home/cvs/wine/dlls/kernel/tests/atom.c,v
retrieving revision 1.7
diff -u -r1.7 atom.c
--- dlls/kernel/tests/atom.c 5 Sep 2003 23:08:36 -0000 1.7
+++ dlls/kernel/tests/atom.c 22 Jan 2004 00:10:17 -0000
@@ -39,13 +39,13 @@
SetLastError( 0xdeadbeef );
atom = GlobalAddAtomA( "foobar" );
- ok( atom >= 0xc000, "bad atom id %x", atom );
- ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomA set last error" );
+ ok( atom >= 0xc000, "bad atom id %x\n", atom );
+ ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomA set last error\n" );
/* Verify that it can be found (or not) appropriately */
- ok( GlobalFindAtomA( "foobar" ) == atom, "could not find atom foobar" );
- ok( GlobalFindAtomA( "FOOBAR" ) == atom, "could not find atom FOOBAR" );
- ok( !GlobalFindAtomA( "_foobar" ), "found _foobar" );
+ ok( GlobalFindAtomA( "foobar" ) == atom, "could not find atom foobar\n" );
+ ok( GlobalFindAtomA( "FOOBAR" ) == atom, "could not find atom FOOBAR\n" );
+ ok( !GlobalFindAtomA( "_foobar" ), "found _foobar\n" );
/* Add the same atom, specifying string as unicode; should
* find the first one, not add a new one */
@@ -58,16 +58,16 @@
if (unicode_OS)
{
- ok( w_atom == atom, "Unicode atom does not match ASCII" );
- ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomW set last error" );
+ ok( w_atom == atom, "Unicode atom does not match ASCII\n" );
+ ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomW set last error\n" );
}
/* Verify that it can be found (or not) appropriately via unicode name */
if (unicode_OS)
{
- ok( GlobalFindAtomW( foobarW ) == atom, "could not find atom foobar" );
- ok( GlobalFindAtomW( FOOBARW ) == atom, "could not find atom FOOBAR" );
- ok( !GlobalFindAtomW( _foobarW ), "found _foobar" );
+ ok( GlobalFindAtomW( foobarW ) == atom, "could not find atom foobar\n" );
+ ok( GlobalFindAtomW( FOOBARW ) == atom, "could not find atom FOOBAR\n" );
+ ok( !GlobalFindAtomW( _foobarW ), "found _foobar\n" );
}
/* Test integer atoms
@@ -75,11 +75,11 @@
* (0xc000 .. 0xffff) should be invalid */
SetLastError( 0xdeadbeef );
- ok( GlobalAddAtomA(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0" );
+ ok( GlobalAddAtomA(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" );
if (unicode_OS)
{
SetLastError( 0xdeadbeef );
- ok( GlobalAddAtomW(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0" );
+ ok( GlobalAddAtomW(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" );
}
SetLastError( 0xdeadbeef );
@@ -87,20 +87,20 @@
{
SetLastError( 0xdeadbeef );
ok( GlobalAddAtomA((LPCSTR)i) == i && GetLastError() == 0xdeadbeef,
- "failed to add atom %x", i );
+ "failed to add atom %x\n", i );
if (unicode_OS)
{
SetLastError( 0xdeadbeef );
ok( GlobalAddAtomW((LPCWSTR)i) == i && GetLastError() == 0xdeadbeef,
- "failed to add atom %x", i );
+ "failed to add atom %x\n", i );
}
}
for (i = 0xc000; i <= 0xffff; i++)
{
- ok( !GlobalAddAtomA((LPCSTR)i), "succeeded adding %x", i );
+ ok( !GlobalAddAtomA((LPCSTR)i), "succeeded adding %x\n", i );
if (unicode_OS)
- ok( !GlobalAddAtomW((LPCWSTR)i), "succeeded adding %x", i );
+ ok( !GlobalAddAtomW((LPCWSTR)i), "succeeded adding %x\n", i );
}
}
@@ -117,8 +117,8 @@
/* Get the name of the atom we added above */
memset( buf, '.', sizeof(buf) );
len = GlobalGetAtomNameA( atom, buf, 10 );
- ok( len == strlen("foobar"), "bad length %d", len );
- ok( !memcmp( buf, "foobar\0...", 10 ), "bad buffer contents" );
+ ok( len == strlen("foobar"), "bad length %d\n", len );
+ ok( !memcmp( buf, "foobar\0...", 10 ), "bad buffer contents\n" );
/* Repeat, unicode-style */
if (unicode_OS)
@@ -126,23 +126,23 @@
for (i = 0; i < 10; i++) bufW[i] = '.';
SetLastError( 0xdeadbeef );
len = GlobalGetAtomNameW( atom, bufW, 10 );
- ok( len && GetLastError() == 0xdeadbeef, "GlobalGetAtomNameW failed" );
- ok( len == lstrlenW(foobarW), "bad length %d", len );
- ok( !memcmp( bufW, resultW, 10*sizeof(WCHAR) ), "bad buffer contents" );
+ ok( len && GetLastError() == 0xdeadbeef, "GlobalGetAtomNameW failed\n" );
+ ok( len == lstrlenW(foobarW), "bad length %d\n", len );
+ ok( !memcmp( bufW, resultW, 10*sizeof(WCHAR) ), "bad buffer contents\n" );
}
/* Check error code returns */
memset(buf, '.', 10);
- ok( !GlobalGetAtomNameA( atom, buf, 0 ), "succeeded" );
- ok( !memcmp( buf, "..........", 10 ), "should not touch buffer" );
+ ok( !GlobalGetAtomNameA( atom, buf, 0 ), "succeeded\n" );
+ ok( !memcmp( buf, "..........", 10 ), "should not touch buffer\n" );
if (unicode_OS)
{
static const WCHAR sampleW[10] = {'.','.','.','.','.','.','.','.','.','.'};
for (i = 0; i < 10; i++) bufW[i] = '.';
- ok( !GlobalGetAtomNameW( atom, bufW, 0 ), "succeeded" );
- ok( !memcmp( bufW, sampleW, 10 * sizeof(WCHAR) ), "should not touch buffer" );
+ ok( !GlobalGetAtomNameW( atom, bufW, 0 ), "succeeded\n" );
+ ok( !memcmp( bufW, sampleW, 10 * sizeof(WCHAR) ), "should not touch buffer\n" );
}
/* Test integer atoms */
@@ -153,13 +153,13 @@
if (i)
{
char res[20];
- ok( (len > 1) && (len < 7), "bad length %d", len );
+ ok( (len > 1) && (len < 7), "bad length %d\n", len );
sprintf( res, "#%d", i );
memset( res + strlen(res) + 1, 'a', 10 );
- ok( !memcmp( res, buf, 10 ), "bad buffer contents %s", buf );
+ ok( !memcmp( res, buf, 10 ), "bad buffer contents %s\n", buf );
}
else
- ok( !len, "bad length %d", len );
+ ok( !len, "bad length %d\n", len );
}
}
@@ -171,15 +171,15 @@
memset( buffer, 'a', 256 );
buffer[256] = 0;
- ok( !GlobalAddAtomA(buffer), "add succeeded" );
- ok( !GlobalFindAtomA(buffer), "find succeeded" );
+ ok( !GlobalAddAtomA(buffer), "add succeeded\n" );
+ ok( !GlobalFindAtomA(buffer), "find succeeded\n" );
if (unicode_OS)
{
for (i = 0; i < 256; i++) bufferW[i] = 'b';
bufferW[256] = 0;
- ok( !GlobalAddAtomW(bufferW), "add succeeded" );
- ok( !GlobalFindAtomW(bufferW), "find succeeded" );
+ ok( !GlobalAddAtomW(bufferW), "add succeeded\n" );
+ ok( !GlobalFindAtomW(bufferW), "find succeeded\n" );
}
}
Index: dlls/kernel/tests/codepage.c
===================================================================
RCS file: /home/cvs/wine/dlls/kernel/tests/codepage.c,v
retrieving revision 1.3
diff -u -r1.3 codepage.c
--- dlls/kernel/tests/codepage.c 5 Sep 2003 23:08:36 -0000 1.3
+++ dlls/kernel/tests/codepage.c 9 Sep 2003 19:04:09 -0000
@@ -47,13 +47,13 @@
memset(buf,'x',sizeof(buf));
len = WideCharToMultiByte(CP_ACP, 0, foobarW, -2002, buf, 10, NULL, NULL);
ok(len == 7 && !lstrcmpA(buf, "foobar") && GetLastError() == 0xdeadbeef,
- "WideCharToMultiByte(-2002): len=%d error=%ld",len,GetLastError());
+ "WideCharToMultiByte(-2002): len=%d error=%ld\n",len,GetLastError());
SetLastError( 0xdeadbeef );
memset(bufW,'x',sizeof(bufW));
len = MultiByteToWideChar(CP_ACP, 0, "foobar", -2002, bufW, 10);
ok(len == 7 && !mylstrcmpW(bufW, foobarW) && GetLastError() == 0xdeadbeef,
- "MultiByteToWideChar(-2002): len=%d error=%ld",len,GetLastError());
+ "MultiByteToWideChar(-2002): len=%d error=%ld\n",len,GetLastError());
}
START_TEST(codepage)
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
The greatest programming project of all took six days; on the seventh day the
programmer rested. We've been trying to debug the *&^%$#@ thing ever since.
Moral: design before you implement.
More information about the wine-patches
mailing list