[USER32_APITEST]

Add a cursor and an icon and use those instead of system cursor. Fixes tests on Windows.

svn path=/trunk/; revision=50965
This commit is contained in:
Timo Kreuzer 2011-03-03 21:49:44 +00:00
parent aa66728228
commit 54010b7e9e
7 changed files with 27 additions and 6 deletions

View file

@ -9,7 +9,8 @@ list(APPEND SOURCE
GetSystemMetrics.c
GetIconInfo.c
GetPeekMessage.c
testlist.c)
testlist.c
user32_apitest.rc)
add_executable(user32_apitest ${SOURCE})
target_link_libraries(user32_apitest wine)

View file

@ -2,7 +2,7 @@
#include <stdio.h>
#include <wine/test.h>
#include <windows.h>
#include "resource.h"
// FIXME user32
@ -144,12 +144,21 @@ START_TEST(GetIconInfo)
Test_GetIconInfo(0);
Test_GetIconInfo(1);
hcursor = LoadCursor(NULL, IDC_APPSTARTING);
ok(hcursor != 0, "should not fail\n");
hcursor = LoadCursor(GetModuleHandle(NULL), "TESTCURSOR");
ok(hcursor != 0, "should not fail, error %ld\n", GetLastError());
ok(GetIconInfo(hcursor, &iconinfo2), "\n");
ok(iconinfo2.fIcon == 0, "\n");
ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot);
ok(iconinfo2.yHotspot == 8, "%ld\n", iconinfo2.yHotspot);
ok(iconinfo2.xHotspot == 8, "%ld\n", iconinfo2.xHotspot);
ok(iconinfo2.yHotspot == 29, "%ld\n", iconinfo2.yHotspot);
ok(iconinfo2.hbmMask != NULL, "\n");
ok(iconinfo2.hbmColor != NULL, "\n");
hcursor = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_TEST));
ok(hcursor != 0, "should not fail\n");
ok(GetIconInfo(hcursor, &iconinfo2), "\n");
ok(iconinfo2.fIcon == 1, "\n");
ok(iconinfo2.xHotspot == 16, "%ld\n", iconinfo2.xHotspot);
ok(iconinfo2.yHotspot == 16, "%ld\n", iconinfo2.yHotspot);
ok(iconinfo2.hbmMask != NULL, "\n");
ok(iconinfo2.hbmColor != NULL, "\n");

View file

@ -0,0 +1,3 @@
#define IDI_TEST 1000

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View file

@ -8,6 +8,7 @@
<library>user32</library>
<library>pseh</library>
<file>testlist.c</file>
<file>user32_apitest.rc</file>
<file>InitializeLpkHooks.c</file>
<file>RealGetWindowClass.c</file>

View file

@ -0,0 +1,7 @@
#include <windows.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDI_TEST ICON "test.ico"
TESTCURSOR CURSOR "test.cur"