Sebastian Lackner : user32/tests: Remove unnecessary char array and add additional test in test_FindWindowEx.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Nov 18 10:25:19 CST 2014


Module: wine
Branch: master
Commit: 0cf86baf65e265fe81d93c5299a325bf658b15c9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0cf86baf65e265fe81d93c5299a325bf658b15c9

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Tue Nov 18 04:46:08 2014 +0100

user32/tests: Remove unnecessary char array and add additional test in test_FindWindowEx.

---

 dlls/user32/tests/win.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index cfc2a02..d1a7ca4 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -6931,24 +6931,23 @@ todo_wine
 static void test_FindWindowEx(void)
 {
     HWND hwnd, found;
-    CHAR title[1];
 
     hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
     ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
 
-    title[0] = 0;
-
-    found = FindWindowExA( 0, 0, "MainWindowClass", title );
+    found = FindWindowExA( 0, 0, "MainWindowClass", "" );
     ok( found == NULL, "expected a NULL hwnd\n" );
     found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
     ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
+    found = FindWindowExA( 0, 0, "MainWindowClass", "caption" );
+    ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
 
     DestroyWindow( hwnd );
 
     hwnd = CreateWindowExA( 0, "MainWindowClass", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
     ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
 
-    found = FindWindowExA( 0, 0, "MainWindowClass", title );
+    found = FindWindowExA( 0, 0, "MainWindowClass", "" );
     ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
     found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
     ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
@@ -6956,7 +6955,7 @@ static void test_FindWindowEx(void)
     DestroyWindow( hwnd );
 
     /* test behaviour with a window title that is an empty character */
-    found = FindWindowExA( 0, 0, "Shell_TrayWnd", title );
+    found = FindWindowExA( 0, 0, "Shell_TrayWnd", "" );
     ok( found != NULL, "found is NULL, expected a valid hwnd\n" );
     found = FindWindowExA( 0, 0, "Shell_TrayWnd", NULL );
     ok( found != NULL, "found is NULL, expected a valid hwnd\n" );




More information about the wine-cvs mailing list