Sebastian Lackner : user32/tests: Reenable test function for WM_GETTEXT.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 18 10:25:19 CST 2014
Module: wine
Branch: master
Commit: 0a6e56bdc686912adefefc06c39043a659743508
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0a6e56bdc686912adefefc06c39043a659743508
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Tue Nov 18 05:01:45 2014 +0100
user32/tests: Reenable test function for WM_GETTEXT.
---
dlls/user32/tests/win.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index e7ffb25..24cbd78 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -5691,21 +5691,15 @@ static void test_ShowWindow(void)
static void test_gettext(void)
{
- WNDCLASSA cls;
- LPCSTR clsname = "gettexttest";
HWND hwnd;
LRESULT r;
- memset( &cls, 0, sizeof cls );
- cls.lpfnWndProc = DefWindowProcA;
- cls.lpszClassName = clsname;
- cls.hInstance = GetModuleHandleA(NULL);
-
- if (!RegisterClassA( &cls )) return;
-
- hwnd = CreateWindowA( clsname, "test text", WS_OVERLAPPED, 0, 0, 10, 10, 0, NULL, NULL, NULL);
- ok( hwnd != NULL, "window was null\n");
+ hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL );
+ ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() );
+ /* seems to crash on every modern Windows version */
+ if (0)
+ {
r = SendMessageA( hwnd, WM_GETTEXT, 0x10, 0x1000);
ok( r == 0, "settext should return zero\n");
@@ -5717,9 +5711,9 @@ static void test_gettext(void)
r = SendMessageA( hwnd, WM_GETTEXT, 0x1000, 0xff000000);
ok( r == 0, "settext should return zero (%ld)\n", r);
+ }
DestroyWindow(hwnd);
- UnregisterClassA( clsname, NULL );
}
@@ -7987,7 +7981,7 @@ START_TEST(win)
test_csparentdc();
test_SetWindowLong();
test_ShowWindow();
- if (0) test_gettext(); /* crashes on NT4 */
+ test_gettext();
test_GetUpdateRect();
test_Expose();
test_layered_window();
More information about the wine-cvs
mailing list