Commit 47e11622 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Add trailing '\n's to ok() calls.

parent a53c8849
......@@ -32,16 +32,16 @@ void test_GetDriveTypeA(void)
UINT type;
logical_drives = GetLogicalDrives();
ok(logical_drives != 0, "GetLogicalDrives error %ld", GetLastError());
ok(logical_drives != 0, "GetLogicalDrives error %ld\n", GetLastError());
for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++)
{
type = GetDriveTypeA(drive);
ok(type > 0 && type <= 6, "not a valid drive %c: type %u", drive[0], type);
ok(type > 0 && type <= 6, "not a valid drive %c: type %u\n", drive[0], type);
if (!(logical_drives & 1))
ok(type == DRIVE_NO_ROOT_DIR,
"GetDriveTypeA should return DRIVE_NO_ROOT_DIR for inexistant drive %c: but not %u",
"GetDriveTypeA should return DRIVE_NO_ROOT_DIR for inexistant drive %c: but not %u\n",
drive[0], type);
logical_drives >>= 1;
......@@ -55,7 +55,7 @@ void test_GetDriveTypeW(void)
UINT type;
logical_drives = GetLogicalDrives();
ok(logical_drives != 0, "GetLogicalDrives error %ld", GetLastError());
ok(logical_drives != 0, "GetLogicalDrives error %ld\n", GetLastError());
for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++)
{
......@@ -65,11 +65,11 @@ void test_GetDriveTypeW(void)
/* Must be Win9x which doesn't support the Unicode functions */
return;
}
ok(type > 0 && type <= 6, "not a valid drive %c: type %u", drive[0], type);
ok(type > 0 && type <= 6, "not a valid drive %c: type %u\n", drive[0], type);
if (!(logical_drives & 1))
ok(type == DRIVE_NO_ROOT_DIR,
"GetDriveTypeW should return DRIVE_NO_ROOT_DIR for inexistant drive %c: but not %u",
"GetDriveTypeW should return DRIVE_NO_ROOT_DIR for inexistant drive %c: but not %u\n",
drive[0], type);
logical_drives >>= 1;
......@@ -84,21 +84,21 @@ void test_GetDiskFreeSpaceA(void)
DWORD logical_drives;
ret = GetDiskFreeSpaceA(NULL, &sectors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
ok(ret, "GetDiskFreeSpaceA error %ld", GetLastError());
ok(ret, "GetDiskFreeSpaceA error %ld\n", GetLastError());
ret = GetDiskFreeSpaceA("", &sectors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
ok(!ret && (GetLastError() == ERROR_PATH_NOT_FOUND || GetLastError() == ERROR_INVALID_NAME),
"GetDiskFreeSpaceA(\"\"): ret=%d GetLastError=%ld",
"GetDiskFreeSpaceA(\"\"): ret=%d GetLastError=%ld\n",
ret, GetLastError());
ret = GetDiskFreeSpaceA("\\", &sectors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
ok(ret, "GetDiskFreeSpaceA error %ld", GetLastError());
ok(ret, "GetDiskFreeSpaceA error %ld\n", GetLastError());
ret = GetDiskFreeSpaceA("/", &sectors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
ok(ret, "GetDiskFreeSpaceA error %ld", GetLastError());
ok(ret, "GetDiskFreeSpaceA error %ld\n", GetLastError());
logical_drives = GetLogicalDrives();
ok(logical_drives != 0, "GetLogicalDrives error %ld", GetLastError());
ok(logical_drives != 0, "GetLogicalDrives error %ld\n", GetLastError());
for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++)
{
......@@ -110,12 +110,12 @@ void test_GetDiskFreeSpaceA(void)
ret = GetDiskFreeSpaceA(drive, &sectors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
if (!(logical_drives & 1))
ok(!ret && (GetLastError() == ERROR_PATH_NOT_FOUND || GetLastError() == ERROR_INVALID_DRIVE),
"GetDiskFreeSpaceA(%s): ret=%d GetLastError=%ld",
"GetDiskFreeSpaceA(%s): ret=%d GetLastError=%ld\n",
drive, ret, GetLastError());
else
ok(ret ||
(!ret && (GetLastError() == ERROR_NOT_READY || GetLastError() == ERROR_INVALID_DRIVE)),
"GetDiskFreeSpaceA(%s): ret=%d GetLastError=%ld",
"GetDiskFreeSpaceA(%s): ret=%d GetLastError=%ld\n",
drive, ret, GetLastError());
}
logical_drives >>= 1;
......@@ -138,21 +138,21 @@ void test_GetDiskFreeSpaceW(void)
/* Must be Win9x which doesn't support the Unicode functions */
return;
}
ok(ret, "GetDiskFreeSpaceW error %ld", GetLastError());
ok(ret, "GetDiskFreeSpaceW error %ld\n", GetLastError());
ret = GetDiskFreeSpaceW(empty_pathW, &sectors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
ok(!ret && GetLastError() == ERROR_PATH_NOT_FOUND,
"GetDiskFreeSpaceW(\"\"): ret=%d GetLastError=%ld",
"GetDiskFreeSpaceW(\"\"): ret=%d GetLastError=%ld\n",
ret, GetLastError());
ret = GetDiskFreeSpaceW(root_pathW, &sectors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
ok(ret, "GetDiskFreeSpaceW(\"\") error %ld", GetLastError());
ok(ret, "GetDiskFreeSpaceW(\"\") error %ld\n", GetLastError());
ret = GetDiskFreeSpaceW(unix_style_root_pathW, &sectors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
ok(ret, "GetDiskFreeSpaceW error %ld", GetLastError());
ok(ret, "GetDiskFreeSpaceW error %ld\n", GetLastError());
logical_drives = GetLogicalDrives();
ok(logical_drives != 0, "GetLogicalDrives error %ld", GetLastError());
ok(logical_drives != 0, "GetLogicalDrives error %ld\n", GetLastError());
for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++)
{
......@@ -162,11 +162,11 @@ void test_GetDiskFreeSpaceW(void)
ret = GetDiskFreeSpaceW(drive, &sectors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
if (!(logical_drives & 1))
ok(!ret && GetLastError() == ERROR_PATH_NOT_FOUND,
"GetDiskFreeSpaceW(%c): ret=%d GetLastError=%ld",
"GetDiskFreeSpaceW(%c): ret=%d GetLastError=%ld\n",
drive[0], ret, GetLastError());
else
ok(ret || GetLastError() == ERROR_NOT_READY,
"GetDiskFreeSpaceW(%c): ret=%d GetLastError=%ld",
"GetDiskFreeSpaceW(%c): ret=%d GetLastError=%ld\n",
drive[0], ret, GetLastError());
}
logical_drives >>= 1;
......
......@@ -36,58 +36,58 @@ static void test_GetSetEnvironmentVariableA(void)
ret = SetEnvironmentVariableA(name, value);
ok(ret == TRUE,
"unexpected error in SetEnvironmentVariableA, GetLastError=%ld",
"unexpected error in SetEnvironmentVariableA, GetLastError=%ld\n",
GetLastError());
/* Try to retrieve the environment variable we just set */
ret_size = GetEnvironmentVariableA(name, NULL, 0);
ok(ret_size == strlen(value) + 1,
"should return length with terminating 0 ret_size=%ld", ret_size);
"should return length with terminating 0 ret_size=%ld\n", ret_size);
lstrcpyA(buf, "foo");
ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value));
ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer");
ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n");
ok(ret_size == strlen(value) + 1,
"should return length with terminating 0 ret_size=%ld", ret_size);
"should return length with terminating 0 ret_size=%ld\n", ret_size);
lstrcpyA(buf, "foo");
ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1);
ok(lstrcmpA(buf, value) == 0, "should touch the buffer");
ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n");
ok(ret_size == strlen(value),
"should return length without terminating 0 ret_size=%ld", ret_size);
"should return length without terminating 0 ret_size=%ld\n", ret_size);
lstrcpyA(buf, "foo");
ret_size = GetEnvironmentVariableA(name_cased, buf, lstrlenA(value) + 1);
ok(lstrcmpA(buf, value) == 0, "should touch the buffer");
ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n");
ok(ret_size == strlen(value),
"should return length without terminating 0 ret_size=%ld", ret_size);
"should return length without terminating 0 ret_size=%ld\n", ret_size);
/* Remove that environment variable */
ret = SetEnvironmentVariableA(name_cased, NULL);
ok(ret == TRUE, "should erase existing variable");
ok(ret == TRUE, "should erase existing variable\n");
lstrcpyA(buf, "foo");
ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1);
ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer");
ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n");
ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
"should not find variable but ret_size=%ld GetLastError=%ld",
"should not find variable but ret_size=%ld GetLastError=%ld\n",
ret_size, GetLastError());
/* Check behavior of SetEnvironmentVariableA(name, "") */
ret = SetEnvironmentVariableA(name, value);
ok(ret == TRUE,
"unexpected error in SetEnvironmentVariableA, GetLastError=%ld",
"unexpected error in SetEnvironmentVariableA, GetLastError=%ld\n",
GetLastError());
lstrcpyA(buf, "foo");
ret_size = GetEnvironmentVariableA(name_cased, buf, lstrlenA(value) + 1);
ok(lstrcmpA(buf, value) == 0, "should touch the buffer");
ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n");
ok(ret_size == strlen(value),
"should return length without terminating 0 ret_size=%ld", ret_size);
"should return length without terminating 0 ret_size=%ld\n", ret_size);
ret = SetEnvironmentVariableA(name_cased, "");
ok(ret == TRUE,
"should not fail with empty value but GetLastError=%ld", GetLastError());
"should not fail with empty value but GetLastError=%ld\n", GetLastError());
lstrcpyA(buf, "foo");
SetLastError(0);
......@@ -95,23 +95,23 @@ static void test_GetSetEnvironmentVariableA(void)
ok(ret_size == 0 &&
((GetLastError() == 0 && lstrcmpA(buf, "") == 0) ||
(GetLastError() == ERROR_ENVVAR_NOT_FOUND)),
"%s should be set to \"\" (NT) or removed (Win9x) but ret_size=%ld GetLastError=%ld and buf=%s",
"%s should be set to \"\" (NT) or removed (Win9x) but ret_size=%ld GetLastError=%ld and buf=%s\n",
name, ret_size, GetLastError(), buf);
/* Test the limits */
ret_size = GetEnvironmentVariableA(NULL, NULL, 0);
ok(ret_size == 0 && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND),
"should not find variable but ret_size=%ld GetLastError=%ld",
"should not find variable but ret_size=%ld GetLastError=%ld\n",
ret_size, GetLastError());
ret_size = GetEnvironmentVariableA(NULL, buf, lstrlenA(value) + 1);
ok(ret_size == 0 && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND),
"should not find variable but ret_size=%ld GetLastError=%ld",
"should not find variable but ret_size=%ld GetLastError=%ld\n",
ret_size, GetLastError());
ret_size = GetEnvironmentVariableA("", buf, lstrlenA(value) + 1);
ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
"should not find variable but ret_size=%ld GetLastError=%ld",
"should not find variable but ret_size=%ld GetLastError=%ld\n",
ret_size, GetLastError());
}
......@@ -133,81 +133,81 @@ static void test_GetSetEnvironmentVariableW(void)
return;
}
ok(ret == TRUE,
"unexpected error in SetEnvironmentVariableW, GetLastError=%ld",
"unexpected error in SetEnvironmentVariableW, GetLastError=%ld\n",
GetLastError());
/* Try to retrieve the environment variable we just set */
ret_size = GetEnvironmentVariableW(name, NULL, 0);
ok(ret_size == lstrlenW(value) + 1,
"should return length with terminating 0 ret_size=%ld",
"should return length with terminating 0 ret_size=%ld\n",
ret_size);
lstrcpyW(buf, fooW);
ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value));
ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer");
ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n");
ok(ret_size == lstrlenW(value) + 1,
"should return length with terminating 0 ret_size=%ld", ret_size);
"should return length with terminating 0 ret_size=%ld\n", ret_size);
lstrcpyW(buf, fooW);
ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1);
ok(lstrcmpW(buf, value) == 0, "should touch the buffer");
ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n");
ok(ret_size == lstrlenW(value),
"should return length without terminating 0 ret_size=%ld", ret_size);
"should return length without terminating 0 ret_size=%ld\n", ret_size);
lstrcpyW(buf, fooW);
ret_size = GetEnvironmentVariableW(name_cased, buf, lstrlenW(value) + 1);
ok(lstrcmpW(buf, value) == 0, "should touch the buffer");
ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n");
ok(ret_size == lstrlenW(value),
"should return length without terminating 0 ret_size=%ld", ret_size);
"should return length without terminating 0 ret_size=%ld\n", ret_size);
/* Remove that environment variable */
ret = SetEnvironmentVariableW(name_cased, NULL);
ok(ret == TRUE, "should erase existing variable");
ok(ret == TRUE, "should erase existing variable\n");
lstrcpyW(buf, fooW);
ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1);
ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer");
ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n");
ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
"should not find variable but ret_size=%ld GetLastError=%ld",
"should not find variable but ret_size=%ld GetLastError=%ld\n",
ret_size, GetLastError());
/* Check behavior of SetEnvironmentVariableW(name, "") */
ret = SetEnvironmentVariableW(name, value);
ok(ret == TRUE,
"unexpected error in SetEnvironmentVariableW, GetLastError=%ld",
"unexpected error in SetEnvironmentVariableW, GetLastError=%ld\n",
GetLastError());
lstrcpyW(buf, fooW);
ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1);
ok(lstrcmpW(buf, value) == 0, "should touch the buffer");
ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n");
ok(ret_size == lstrlenW(value),
"should return length without terminating 0 ret_size=%ld", ret_size);
"should return length without terminating 0 ret_size=%ld\n", ret_size);
ret = SetEnvironmentVariableW(name_cased, empty_strW);
ok(ret == TRUE, "should not fail with empty value but GetLastError=%ld", GetLastError());
ok(ret == TRUE, "should not fail with empty value but GetLastError=%ld\n", GetLastError());
lstrcpyW(buf, fooW);
ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1);
ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
"should not find variable but ret_size=%ld GetLastError=%ld",
"should not find variable but ret_size=%ld GetLastError=%ld\n",
ret_size, GetLastError());
ok(lstrcmpW(buf, empty_strW) == 0, "should copy an empty string");
ok(lstrcmpW(buf, empty_strW) == 0, "should copy an empty string\n");
/* Test the limits */
ret_size = GetEnvironmentVariableW(NULL, NULL, 0);
ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
"should not find variable but ret_size=%ld GetLastError=%ld",
"should not find variable but ret_size=%ld GetLastError=%ld\n",
ret_size, GetLastError());
ret_size = GetEnvironmentVariableW(NULL, buf, lstrlenW(value) + 1);
ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
"should not find variable but ret_size=%ld GetLastError=%ld",
"should not find variable but ret_size=%ld GetLastError=%ld\n",
ret_size, GetLastError());
ret = SetEnvironmentVariableW(NULL, NULL);
ok(ret == FALSE && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND),
"should fail with NULL, NULL but ret=%d and GetLastError=%ld",
"should fail with NULL, NULL but ret=%d and GetLastError=%ld\n",
ret, GetLastError());
}
......
......@@ -67,10 +67,10 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
classatom=RegisterClassW(&cls);
if (!classatom && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
return;
ok(classatom, "failed to register class");
ok(classatom, "failed to register class\n");
ok(!RegisterClassW (&cls),
"RegisterClass of the same class should fail for the second time");
"RegisterClass of the same class should fail for the second time\n");
/* Setup windows */
hTestWnd = CreateWindowW (className, winName,
......@@ -78,16 +78,16 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0,
0, hInstance, 0);
ok(hTestWnd!=0, "Failed to create window");
ok(hTestWnd!=0, "Failed to create window\n");
/* test initial values of valid classwords */
for(i=0; i<NUMCLASSWORDS; i++)
{
SetLastError(0);
ok(!GetClassLongW(hTestWnd,i*sizeof (DWORD)),
"GetClassLongW initial value nonzero!");
"GetClassLongW initial value nonzero!\n");
ok(!GetLastError(),
"GetClassLongW failed!");
"GetClassLongW failed!\n");
}
#if 0
......@@ -98,7 +98,7 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
SetLastError(0);
GetClassLongW(hTestWnd, NUMCLASSWORDS*sizeof(DWORD));
ok(GetLastError(),
"GetClassLongW() with invalid offset did not fail");
"GetClassLongW() with invalid offset did not fail\n");
#endif
/* set values of valid class words */
......@@ -106,9 +106,9 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
{
SetLastError(0);
ok(!SetClassLongW(hTestWnd,i*sizeof(DWORD),i+1),
"GetClassLongW(%ld) initial value nonzero!",i*sizeof(DWORD));
"GetClassLongW(%ld) initial value nonzero!\n",i*sizeof(DWORD));
ok(!GetLastError(),
"SetClassLongW(%ld) failed!",i*sizeof(DWORD));
"SetClassLongW(%ld) failed!\n",i*sizeof(DWORD));
}
/* test values of valid classwords that we set */
......@@ -116,36 +116,36 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
{
SetLastError(0);
ok( (i+1) == GetClassLongW(hTestWnd,i*sizeof (DWORD)),
"GetClassLongW value doesn't match what was set!");
"GetClassLongW value doesn't match what was set!\n");
ok(!GetLastError(),
"GetClassLongW failed!");
"GetClassLongW failed!\n");
}
/* check GetClassName */
i = GetClassNameW(hTestWnd, str, sizeof(str));
ok(i == lstrlenW(className),
"GetClassName returned incorrect length");
"GetClassName returned incorrect length\n");
ok(!lstrcmpW(className,str),
"GetClassName returned incorrect name for this window's class");
"GetClassName returned incorrect name for this window's class\n");
/* check GetClassInfo with our hInstance */
if((test_atom = GetClassInfoW(hInstance, str, &wc)))
{
ok(test_atom == classatom,
"class atom did not match");
"class atom did not match\n");
ok(wc.cbClsExtra == cls.cbClsExtra,
"cbClsExtra did not match");
"cbClsExtra did not match\n");
ok(wc.cbWndExtra == cls.cbWndExtra,
"cbWndExtra did not match");
"cbWndExtra did not match\n");
ok(wc.hbrBackground == cls.hbrBackground,
"hbrBackground did not match");
"hbrBackground did not match\n");
ok(wc.hCursor== cls.hCursor,
"hCursor did not match");
"hCursor did not match\n");
ok(wc.hInstance== cls.hInstance,
"hInstance did not match");
"hInstance did not match\n");
}
else
ok(FALSE,"GetClassInfo (hinstance) failed!");
ok(FALSE,"GetClassInfo (hinstance) failed!\n");
/* check GetClassInfo with zero hInstance */
if(global)
......@@ -153,35 +153,35 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
if((test_atom = GetClassInfoW(0, str, &wc)))
{
ok(test_atom == classatom,
"class atom did not match %x != %x", test_atom, classatom);
"class atom did not match %x != %x\n", test_atom, classatom);
ok(wc.cbClsExtra == cls.cbClsExtra,
"cbClsExtra did not match %x!=%x",wc.cbClsExtra,cls.cbClsExtra);
"cbClsExtra did not match %x!=%x\n",wc.cbClsExtra,cls.cbClsExtra);
ok(wc.cbWndExtra == cls.cbWndExtra,
"cbWndExtra did not match %x!=%x",wc.cbWndExtra,cls.cbWndExtra);
"cbWndExtra did not match %x!=%x\n",wc.cbWndExtra,cls.cbWndExtra);
ok(wc.hbrBackground == cls.hbrBackground,
"hbrBackground did not match %p!=%p",wc.hbrBackground,cls.hbrBackground);
"hbrBackground did not match %p!=%p\n",wc.hbrBackground,cls.hbrBackground);
ok(wc.hCursor== cls.hCursor,
"hCursor did not match %p!=%p",wc.hCursor,cls.hCursor);
"hCursor did not match %p!=%p\n",wc.hCursor,cls.hCursor);
ok(!wc.hInstance,
"hInstance not zero for global class %p",wc.hInstance);
"hInstance not zero for global class %p\n",wc.hInstance);
}
else
ok(FALSE,"GetClassInfo (0) failed for global class!");
ok(FALSE,"GetClassInfo (0) failed for global class!\n");
}
else
{
ok(!GetClassInfoW(0, str, &wc),
"GetClassInfo (0) succeeded for local class!");
"GetClassInfo (0) succeeded for local class!\n");
}
ok(!UnregisterClassW(className, hInstance),
"Unregister class succeeded with window existing");
"Unregister class succeeded with window existing\n");
ok(DestroyWindow(hTestWnd),
"DestroyWindow() failed!");
"DestroyWindow() failed!\n");
ok(UnregisterClassW(className, hInstance),
"UnregisterClass() failed");
"UnregisterClass() failed\n");
return;
}
......
......@@ -99,7 +99,7 @@ keypress (HWND handle, WPARAM keycode, BYTE scancode, BOOL extended)
#define listbox_field_ok(t, s, f, got) \
ok (t.s.f==got.f, "style %#x, step " #s ", field " #f \
": expected %d, got %d", (unsigned int)t.prop.add_style, \
": expected %d, got %d\n", (unsigned int)t.prop.add_style, \
t.s.f, got.f)
#define listbox_todo_field_ok(t, s, f, got) \
......
......@@ -43,12 +43,12 @@ test_LoadStringA (void)
const int expected = tests[i].expected;
const int len = LoadStringA (hInst, 0, buf, bufsiz);
ok (len == expected, "bufsiz=%d: got %d, expected %d",
ok (len == expected, "bufsiz=%d: got %d, expected %d\n",
bufsiz, len, expected);
ok (!memcmp (buf, str, len),
"bufsiz=%d: got '%s', expected '%.*s'",
"bufsiz=%d: got '%s', expected '%.*s'\n",
bufsiz, buf, len, str);
ok (buf[len] == 0, "bufsiz=%d: NUL termination missing",
ok (buf[len] == 0, "bufsiz=%d: NUL termination missing\n",
bufsiz);
}
}
......
......@@ -133,10 +133,10 @@ static void test_change_message( int action, int optional )
if (change_counter==0 && optional==1)
return;
ok( 1 == change_counter,
"Missed a message: change_counter=%d", change_counter );
"Missed a message: change_counter=%d\n", change_counter );
change_counter = 0;
ok( action == change_last_param,
"Wrong action got %d expected %d", change_last_param, action );
"Wrong action got %d expected %d\n", change_last_param, action );
change_last_param = 0;
}
......@@ -166,13 +166,13 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName, LPCST
if (rc==ERROR_SUCCESS)
{
ok( !strcmp( testValue, value ),
"Wrong value in registry: subKey=%s, valName=%s, testValue=%s, value=%s",
"Wrong value in registry: subKey=%s, valName=%s, testValue=%s, value=%s\n",
subKey1, valName, testValue, value );
found++;
}
else if (strict)
{
ok(0,"Missing registry entry: subKey=%s, valName=%s",
ok(0,"Missing registry entry: subKey=%s, valName=%s\n",
subKey1, valName);
}
if (subKey2 && !strict)
......@@ -185,12 +185,12 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName, LPCST
if (rc==ERROR_SUCCESS)
{
ok( !strcmp( testValue, value ),
"Wrong value in registry: subKey=%s, valName=%s, testValue=%s, value=%s",
"Wrong value in registry: subKey=%s, valName=%s, testValue=%s, value=%s\n",
subKey2, valName, testValue, value );
found++;
}
}
ok(found,"Missing registry entry: %s in %s or %s",
ok(found,"Missing registry entry: %s in %s or %s\n",
valName, subKey1, (subKey2?subKey2:"<n/a>") );
}
......@@ -250,7 +250,7 @@ static void test_SPI_SETBEEP( void ) /* 2 */
ok(rc!=0,"SystemParametersInfoW: rc=%d err=%ld\n",rc,GetLastError());
eq( b, curr_val, "SystemParametersInfoW", "%d" );
}
ok( MessageBeep( MB_OK ), "Return value of MessageBeep when sound is disabled" );
ok( MessageBeep( MB_OK ), "Return value of MessageBeep when sound is disabled\n" );
rc=SystemParametersInfoA( SPI_SETBEEP, old_b, 0, SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
......@@ -294,7 +294,7 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
for (i = 0; i < 3; i++)
{
ok(mi[i] == curr_val[i],
"incorrect value for %d: %d != %d", i, mi[i], curr_val[i]);
"incorrect value for %d: %d != %d\n", i, mi[i], curr_val[i]);
}
rc=SystemParametersInfoW( SPI_GETMOUSE, 0, mi, 0 );
......@@ -304,7 +304,7 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
for (i = 0; i < 3; i++)
{
ok(mi[i] == curr_val[i],
"incorrect value for %d: %d != %d", i, mi[i], curr_val[i]);
"incorrect value for %d: %d != %d\n", i, mi[i], curr_val[i]);
}
}
......@@ -315,8 +315,8 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
mouse_event( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, 0, 0, 0, 0 );
mouse_event( MOUSEEVENTF_MOVE, req_change[i].x, req_change[i].y, 0, 0 );
GetCursorPos( &mv );
ok( proj_change[i].x == mv.x, "Projected dx and real dx comparison. May fail under high load." );
ok( proj_change[i].y == mv.y, "Projected dy equals real dy. May fail under high load." );
ok( proj_change[i].x == mv.x, "Projected dx and real dx comparison. May fail under high load.\n" );
ok( proj_change[i].y == mv.y, "Projected dy equals real dy. May fail under high load.\n" );
}
#endif
}
......
......@@ -56,20 +56,20 @@ static void check_parents( HWND hwnd, HWND ga_parent, HWND gwl_parent, HWND get_
if (pGetAncestor)
{
res = pGetAncestor( hwnd, GA_PARENT );
ok( res == ga_parent, "Wrong result for GA_PARENT %p expected %p", res, ga_parent );
ok( res == ga_parent, "Wrong result for GA_PARENT %p expected %p\n", res, ga_parent );
}
res = (HWND)GetWindowLongA( hwnd, GWL_HWNDPARENT );
ok( res == gwl_parent, "Wrong result for GWL_HWNDPARENT %p expected %p", res, gwl_parent );
ok( res == gwl_parent, "Wrong result for GWL_HWNDPARENT %p expected %p\n", res, gwl_parent );
res = GetParent( hwnd );
ok( res == get_parent, "Wrong result for GetParent %p expected %p", res, get_parent );
ok( res == get_parent, "Wrong result for GetParent %p expected %p\n", res, get_parent );
res = GetWindow( hwnd, GW_OWNER );
ok( res == gw_owner, "Wrong result for GW_OWNER %p expected %p", res, gw_owner );
ok( res == gw_owner, "Wrong result for GW_OWNER %p expected %p\n", res, gw_owner );
if (pGetAncestor)
{
res = pGetAncestor( hwnd, GA_ROOT );
ok( res == ga_root, "Wrong result for GA_ROOT %p expected %p", res, ga_root );
ok( res == ga_root, "Wrong result for GA_ROOT %p expected %p\n", res, ga_root );
res = pGetAncestor( hwnd, GA_ROOTOWNER );
ok( res == ga_root_owner, "Wrong result for GA_ROOTOWNER %p expected %p", res, ga_root_owner );
ok( res == ga_root_owner, "Wrong result for GA_ROOTOWNER %p expected %p\n", res, ga_root_owner );
}
}
......@@ -78,7 +78,7 @@ static HWND create_tool_window( LONG style, HWND parent )
{
HWND ret = CreateWindowExA(0, "ToolWindowClass", "Tool window 1", style,
0, 0, 100, 100, parent, 0, 0, NULL );
ok( ret != 0, "Creation failed" );
ok( ret != 0, "Creation failed\n" );
return ret;
}
......@@ -95,14 +95,14 @@ static void test_parent_owner(void)
/* child without parent, should fail */
test = CreateWindowExA(0, "ToolWindowClass", "Tool window 1",
WS_CHILD, 0, 0, 100, 100, 0, 0, 0, NULL );
ok( !test, "WS_CHILD without parent created" );
ok( !test, "WS_CHILD without parent created\n" );
/* desktop window */
check_parents( desktop, 0, 0, 0, 0, 0, 0 );
style = GetWindowLongA( desktop, GWL_STYLE );
ok( !SetWindowLongA( desktop, GWL_STYLE, WS_POPUP ), "Set GWL_STYLE on desktop succeeded" );
ok( !SetWindowLongA( desktop, GWL_STYLE, 0 ), "Set GWL_STYLE on desktop succeeded" );
ok( GetWindowLongA( desktop, GWL_STYLE ) == style, "Desktop style changed" );
ok( !SetWindowLongA( desktop, GWL_STYLE, WS_POPUP ), "Set GWL_STYLE on desktop succeeded\n" );
ok( !SetWindowLongA( desktop, GWL_STYLE, 0 ), "Set GWL_STYLE on desktop succeeded\n" );
ok( GetWindowLongA( desktop, GWL_STYLE ) == style, "Desktop style changed\n" );
/* normal child window */
test = create_tool_window( WS_CHILD, hwndMain );
......@@ -278,9 +278,9 @@ static void test_parent_owner(void)
check_parents( desktop, 0, 0, 0, 0, 0, 0 );
#if 0 /* this test succeeds on NT but crashes on win9x systems */
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)hwndMain2 );
ok( !ret, "Set GWL_HWNDPARENT succeeded on desktop" );
ok( !ret, "Set GWL_HWNDPARENT succeeded on desktop\n" );
check_parents( desktop, 0, 0, 0, 0, 0, 0 );
ok( !SetParent( desktop, hwndMain ), "SetParent succeeded on desktop" );
ok( !SetParent( desktop, hwndMain ), "SetParent succeeded on desktop\n" );
check_parents( desktop, 0, 0, 0, 0, 0, 0 );
#endif
/* normal child window */
......@@ -288,24 +288,24 @@ static void test_parent_owner(void)
trace( "created child %p\n", test );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)hwndMain2 );
ok( ret == hwndMain, "GWL_HWNDPARENT return value %p expected %p", ret, hwndMain );
ok( ret == hwndMain, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain );
check_parents( test, hwndMain2, hwndMain2, hwndMain2, 0, hwndMain2, hwndMain2 );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)child );
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p", ret, hwndMain2 );
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 );
check_parents( test, child, child, child, 0, hwndMain, hwndMain );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)desktop );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p", ret, child );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
check_parents( test, desktop, 0, desktop, 0, test, desktop );
/* window is now child of desktop so GWL_HWNDPARENT changes owner from now on */
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)child );
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0", ret );
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
check_parents( test, desktop, child, desktop, child, test, desktop );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, 0 );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p", ret, child );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
check_parents( test, desktop, 0, desktop, 0, test, desktop );
DestroyWindow( test );
......@@ -314,15 +314,15 @@ static void test_parent_owner(void)
trace( "created top-level %p\n", test );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)hwndMain2 );
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0", ret );
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
check_parents( test, desktop, hwndMain2, 0, hwndMain2, test, test );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)child );
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p", ret, hwndMain2 );
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 );
check_parents( test, desktop, child, 0, child, test, test );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, 0 );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p", ret, child );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
check_parents( test, desktop, 0, 0, 0, test, test );
DestroyWindow( test );
......@@ -331,15 +331,15 @@ static void test_parent_owner(void)
trace( "created popup %p\n", test );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)hwndMain2 );
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0", ret );
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
check_parents( test, desktop, hwndMain2, hwndMain2, hwndMain2, test, hwndMain2 );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)child );
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p", ret, hwndMain2 );
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 );
check_parents( test, desktop, child, child, child, test, hwndMain );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, 0 );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p", ret, child );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
check_parents( test, desktop, 0, 0, 0, test, test );
DestroyWindow( test );
......@@ -348,15 +348,15 @@ static void test_parent_owner(void)
trace( "created child %p\n", test );
ret = SetParent( test, desktop );
ok( ret == hwndMain, "SetParent return value %p expected %p", ret, hwndMain );
ok( ret == hwndMain, "SetParent return value %p expected %p\n", ret, hwndMain );
check_parents( test, desktop, 0, desktop, 0, test, desktop );
ret = SetParent( test, child );
ok( ret == desktop, "SetParent return value %p expected %p", ret, desktop );
ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop );
check_parents( test, child, child, child, 0, hwndMain, hwndMain );
ret = SetParent( test, hwndMain2 );
ok( ret == child, "SetParent return value %p expected %p", ret, child );
ok( ret == child, "SetParent return value %p expected %p\n", ret, child );
check_parents( test, hwndMain2, hwndMain2, hwndMain2, 0, hwndMain2, hwndMain2 );
DestroyWindow( test );
......@@ -365,7 +365,7 @@ static void test_parent_owner(void)
trace( "created top-level %p\n", test );
ret = SetParent( test, child );
ok( ret == desktop, "SetParent return value %p expected %p", ret, desktop );
ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop );
check_parents( test, child, child, 0, 0, hwndMain, test );
DestroyWindow( test );
......@@ -374,11 +374,11 @@ static void test_parent_owner(void)
trace( "created owned popup %p\n", test );
ret = SetParent( test, child );
ok( ret == desktop, "SetParent return value %p expected %p", ret, desktop );
ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop );
check_parents( test, child, child, hwndMain2, hwndMain2, hwndMain, hwndMain2 );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (ULONG_PTR)hwndMain );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p", ret, child );
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
check_parents( test, hwndMain, hwndMain, hwndMain2, hwndMain2, hwndMain, hwndMain2 );
DestroyWindow( test );
......@@ -389,13 +389,13 @@ static void test_parent_owner(void)
test = create_tool_window( WS_POPUP, owner );
trace( "created owner %p and popup %p\n", owner, test );
ret = SetParent( test, child );
ok( ret == desktop, "SetParent return value %p expected %p", ret, desktop );
ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop );
check_parents( test, child, child, owner, owner, hwndMain, owner );
/* window is now child of 'child' but owned by 'owner' */
DestroyWindow( owner );
ok( IsWindow(test), "Window %p destroyed by owner destruction", test );
ok( IsWindow(test), "Window %p destroyed by owner destruction\n", test );
check_parents( test, child, child, owner, owner, hwndMain, owner );
ok( !IsWindow(owner), "Owner %p not destroyed", owner );
ok( !IsWindow(owner), "Owner %p not destroyed\n", owner );
DestroyWindow(test);
/* owned top-level popup */
......@@ -404,18 +404,18 @@ static void test_parent_owner(void)
trace( "created owner %p and popup %p\n", owner, test );
check_parents( test, desktop, owner, owner, owner, test, owner );
DestroyWindow( owner );
ok( !IsWindow(test), "Window %p not destroyed by owner destruction", test );
ok( !IsWindow(test), "Window %p not destroyed by owner destruction\n", test );
/* top-level popup owned by child */
owner = create_tool_window( WS_CHILD, hwndMain2 );
test = create_tool_window( WS_POPUP, 0 );
trace( "created owner %p and popup %p\n", owner, test );
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (ULONG_PTR)owner );
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0", ret );
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
check_parents( test, desktop, owner, owner, owner, test, hwndMain2 );
DestroyWindow( owner );
ok( IsWindow(test), "Window %p destroyed by owner destruction", test );
ok( !IsWindow(owner), "Owner %p not destroyed", owner );
ok( IsWindow(test), "Window %p destroyed by owner destruction\n", test );
ok( !IsWindow(owner), "Owner %p not destroyed\n", owner );
check_parents( test, desktop, owner, owner, owner, test, owner );
DestroyWindow(test);
......@@ -601,7 +601,7 @@ static void test_shell_window()
GetWindowThreadProcessId(shellWindow, &pid);
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
ret = TerminateProcess(hProcess, 0);
ok(ret, "termination of previous shell process failed: GetLastError()=%ld", GetLastError());
ok(ret, "termination of previous shell process failed: GetLastError()=%ld\n", GetLastError());
WaitForSingleObject(hProcess, INFINITE); /* wait for termination */
CloseHandle(hProcess);
}
......@@ -612,7 +612,7 @@ static void test_shell_window()
ret = SetShellWindow(hwnd1);
ok(ret, "first call to SetShellWindow(hwnd1)\n");
shellWindow = GetShellWindow();
ok(shellWindow==hwnd1, "wrong shell window: %p", shellWindow);
ok(shellWindow==hwnd1, "wrong shell window: %p\n", shellWindow);
ret = SetShellWindow(hwnd1);
ok(!ret, "second call to SetShellWindow(hwnd1)\n");
......@@ -640,7 +640,7 @@ static void test_shell_window()
hwnd2 = CreateWindowEx(WS_EX_TOPMOST, TEXT("#32770"), TEXT("TEST2"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 150, 250, 300, 200, 0, 0, hinst, 0);
trace("created window 2: %p\n", hwnd2);
ret = SetShellWindow(hwnd2);
ok(!ret, "SetShellWindow(hwnd2) with WS_EX_TOPMOST");
ok(!ret, "SetShellWindow(hwnd2) with WS_EX_TOPMOST\n");
hwnd3 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST3"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 200, 400, 300, 200, 0, 0, hinst, 0);
trace("created window 3: %p\n", hwnd3);
......@@ -654,7 +654,7 @@ static void test_shell_window()
ret = SetShellWindow(hwnd4);
ok(ret, "SetShellWindow(hwnd4)\n");
shellWindow = GetShellWindow();
ok(shellWindow==hwnd4, "wrong shell window: %p - expected hwnd4", shellWindow);
ok(shellWindow==hwnd4, "wrong shell window: %p - expected hwnd4\n", shellWindow);
nextWnd = GetWindow(hwnd4, GW_HWNDNEXT);
ok(nextWnd==0, "wrong next window for hwnd4: %p - expected 0\n", nextWnd);
......@@ -663,12 +663,12 @@ static void test_shell_window()
ok(ret, "SetWindowPos(hwnd4, HWND_TOPMOST)\n");
ret = SetWindowPos(hwnd4, hwnd3, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
ok(ret, "SetWindowPos(hwnd4, hwnd3");
ok(ret, "SetWindowPos(hwnd4, hwnd3\n");
ret = SetShellWindow(hwnd3);
ok(!ret, "SetShellWindow(hwnd3)\n");
shellWindow = GetShellWindow();
ok(shellWindow==hwnd4, "wrong shell window: %p - expected hwnd4", shellWindow);
ok(shellWindow==hwnd4, "wrong shell window: %p - expected hwnd4\n", shellWindow);
hwnd5 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST5"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 300, 600, 300, 200, 0, 0, hinst, 0);
trace("created window 5: %p\n", hwnd5);
......
......@@ -30,9 +30,9 @@ static void wsprintfATest(void)
int rc;
rc=wsprintfA(buf, "%010ld", -1);
ok(rc == 10, "wsPrintfA length failure: rc=%d error=%ld",rc,GetLastError());
ok(rc == 10, "wsPrintfA length failure: rc=%d error=%ld\n",rc,GetLastError());
ok((lstrcmpA(buf, "-000000001") == 0),
"wsprintfA zero padded negative value failure: buf=[%s]",buf);
"wsprintfA zero padded negative value failure: buf=[%s]\n",buf);
}
static void wsprintfWTest(void)
......@@ -45,9 +45,9 @@ static void wsprintfWTest(void)
rc=wsprintfW(buf, fmt, -1);
if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
return;
ok(rc == 10, "wsPrintfW length failure: rc=%d error=%ld",rc,GetLastError());
ok(rc == 10, "wsPrintfW length failure: rc=%d error=%ld\n",rc,GetLastError());
ok((lstrcmpW(buf, target) == 0),
"wsprintfW zero padded negative value failure");
"wsprintfW zero padded negative value failure\n");
}
START_TEST(wsprintf)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment