Add a test for window's hinstance
Dmitry Timoshkov
dmitry at baikal.ru
Thu May 20 03:10:09 CDT 2004
Hello,
Current class test produces 94 failures under Win9x. Perhaps we have
to just skip a failing test depending on Windows version. I'll try
to fix failures later.
This new test passes on Wine.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Add a test for window's hinstance.
--- cvs/hq/wine/dlls/user/tests/class.c Tue Apr 20 01:46:00 2004
+++ wine/dlls/user/tests/class.c Thu May 20 07:02:21 2004
@@ -240,7 +240,7 @@ static void check_class(HINSTANCE inst,
static void check_instance( const char *name, HINSTANCE inst, HINSTANCE info_inst, HINSTANCE gcl_inst )
{
- WNDCLASS wc;
+ WNDCLASSA wc;
HWND hwnd;
ok( GetClassInfo( inst, name, &wc ), "Couldn't find class %s inst %p\n", name, inst );
@@ -248,9 +248,12 @@ static void check_instance( const char *
wc.hInstance, info_inst, name );
hwnd = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, inst, 0 );
ok( hwnd != NULL, "Couldn't create window for class %s inst %p\n", name, inst );
- ok( (HINSTANCE)GetClassLong( hwnd, GCL_HMODULE ) == gcl_inst,
+ ok( (HINSTANCE)GetClassLongA( hwnd, GCL_HMODULE ) == gcl_inst,
"Wrong GCL instance %p/%p for class %s\n",
- (HINSTANCE)GetClassLong( hwnd, GCL_HMODULE ), gcl_inst, name );
+ (HINSTANCE)GetClassLongA( hwnd, GCL_HMODULE ), gcl_inst, name );
+ ok( (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ) == inst,
+ "Wrong GWL instance %p/%p for window %s\n",
+ (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), inst, name );
DestroyWindow(hwnd);
}
More information about the wine-patches
mailing list