user32/tests: Remove unnecessary char array and add additional test in test_FindWindowEx.
This commit is contained in:
parent
9f36db8fa5
commit
0cf86baf65
|
@ -6931,24 +6931,23 @@ todo_wine
|
||||||
static void test_FindWindowEx(void)
|
static void test_FindWindowEx(void)
|
||||||
{
|
{
|
||||||
HWND hwnd, found;
|
HWND hwnd, found;
|
||||||
CHAR title[1];
|
|
||||||
|
|
||||||
hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
|
hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
|
||||||
ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
|
ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
|
||||||
|
|
||||||
title[0] = 0;
|
found = FindWindowExA( 0, 0, "MainWindowClass", "" );
|
||||||
|
|
||||||
found = FindWindowExA( 0, 0, "MainWindowClass", title );
|
|
||||||
ok( found == NULL, "expected a NULL hwnd\n" );
|
ok( found == NULL, "expected a NULL hwnd\n" );
|
||||||
found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
|
found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
|
||||||
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
|
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 );
|
DestroyWindow( hwnd );
|
||||||
|
|
||||||
hwnd = CreateWindowExA( 0, "MainWindowClass", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
|
hwnd = CreateWindowExA( 0, "MainWindowClass", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL );
|
||||||
ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
|
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 );
|
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
|
||||||
found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
|
found = FindWindowExA( 0, 0, "MainWindowClass", NULL );
|
||||||
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
|
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
|
||||||
|
@ -6956,7 +6955,7 @@ static void test_FindWindowEx(void)
|
||||||
DestroyWindow( hwnd );
|
DestroyWindow( hwnd );
|
||||||
|
|
||||||
/* test behaviour with a window title that is an empty character */
|
/* 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" );
|
ok( found != NULL, "found is NULL, expected a valid hwnd\n" );
|
||||||
found = FindWindowExA( 0, 0, "Shell_TrayWnd", NULL );
|
found = FindWindowExA( 0, 0, "Shell_TrayWnd", NULL );
|
||||||
ok( found != NULL, "found is NULL, expected a valid hwnd\n" );
|
ok( found != NULL, "found is NULL, expected a valid hwnd\n" );
|
||||||
|
|
Loading…
Reference in New Issue