From 2d7b8f5ec6dd3f6679a99ef14e1105271cf6cdcf Mon Sep 17 00:00:00 2001 From: Austin English Date: Wed, 13 Aug 2008 16:51:20 -0500 Subject: [PATCH] user32: test what FindWindow when window isn't found --- dlls/user32/tests/win.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 9ac29b8..c3a3c4e 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -4782,7 +4782,16 @@ static void test_hwnd_message(void) ok( rect.left == 100 && rect.right == 300 && rect.top == 100 && rect.bottom == 300, "wrong window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - /* test FindWindow behavior */ + SetLastError(0xdeadbeef); + HWND hWnd = FindWindow("SomeWindowThatDoesNotExist", NULL); + if(hWnd) { + printf("hWnd not NULL"); + } + else { + + todo_wine + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + } found = FindWindowExA( 0, 0, 0, "message window" ); ok( found == hwnd, "didn't find message window %p/%p\n", found, hwnd ); -- 1.5.3.6