From 47e116225af10f94a862ed626d9030c8b53a0601 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Fri, 23 Jan 2004 20:50:35 +0000 Subject: [PATCH] Add trailing '\n's to ok() calls. --- dlls/kernel/tests/drive.c | 40 ++++++++++----------- dlls/kernel/tests/environ.c | 78 ++++++++++++++++++++-------------------- dlls/user/tests/class.c | 60 +++++++++++++++---------------- dlls/user/tests/listbox.c | 2 +- dlls/user/tests/resource.c | 6 ++-- dlls/user/tests/sysparams.c | 22 ++++++------ dlls/user/tests/win.c | 86 ++++++++++++++++++++++----------------------- dlls/user/tests/wsprintf.c | 8 ++--- 8 files changed, 151 insertions(+), 151 deletions(-) diff --git a/dlls/kernel/tests/drive.c b/dlls/kernel/tests/drive.c index 192f14e69dd..085f317ad41 100644 --- a/dlls/kernel/tests/drive.c +++ b/dlls/kernel/tests/drive.c @@ -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, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - ok(ret, "GetDiskFreeSpaceA error %ld", GetLastError()); + ok(ret, "GetDiskFreeSpaceA error %ld\n", GetLastError()); ret = GetDiskFreeSpaceA("", §ors_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("\\", §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - ok(ret, "GetDiskFreeSpaceA error %ld", GetLastError()); + ok(ret, "GetDiskFreeSpaceA error %ld\n", GetLastError()); ret = GetDiskFreeSpaceA("/", §ors_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, §ors_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, §ors_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, §ors_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, §ors_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, §ors_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; diff --git a/dlls/kernel/tests/environ.c b/dlls/kernel/tests/environ.c index f511b44342c..ed327034997 100644 --- a/dlls/kernel/tests/environ.c +++ b/dlls/kernel/tests/environ.c @@ -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()); } diff --git a/dlls/user/tests/class.c b/dlls/user/tests/class.c index ebc4af22172..156a12c7fa2 100644 --- a/dlls/user/tests/class.c +++ b/dlls/user/tests/class.c @@ -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") ); } @@ -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 } diff --git a/dlls/user/tests/win.c b/dlls/user/tests/win.c index 8f6807ebc8a..0757d285a6d 100644 --- a/dlls/user/tests/win.c +++ b/dlls/user/tests/win.c @@ -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); diff --git a/dlls/user/tests/wsprintf.c b/dlls/user/tests/wsprintf.c index b1f8c8f860d..bbebdd75f9d 100644 --- a/dlls/user/tests/wsprintf.c +++ b/dlls/user/tests/wsprintf.c @@ -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) -- 2.11.4.GIT