From 0cf86baf65e265fe81d93c5299a325bf658b15c9 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 18 Nov 2014 04:46:08 +0100 Subject: [PATCH] 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 cfc2a021afd..d1a7ca40eb5 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" );