mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 10:45:24 +00:00
[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:
parent
aa66728228
commit
54010b7e9e
|
@ -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)
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
3
rostests/apitests/user32/resource.h
Normal file
3
rostests/apitests/user32/resource.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
|
||||
#define IDI_TEST 1000
|
BIN
rostests/apitests/user32/test.cur
Normal file
BIN
rostests/apitests/user32/test.cur
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
rostests/apitests/user32/test.ico
Normal file
BIN
rostests/apitests/user32/test.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
|
@ -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>
|
||||
|
|
7
rostests/apitests/user32/user32_apitest.rc
Normal file
7
rostests/apitests/user32/user32_apitest.rc
Normal 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"
|
Loading…
Reference in a new issue