From: Timo Kreuzer Date: Thu, 3 Mar 2011 21:49:44 +0000 (+0000) Subject: [USER32_APITEST] X-Git-Tag: ReactOS-0.3.13~78 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=54010b7e9ec30b6a8681fe9fbea00c24f6af4d9c [USER32_APITEST] Add a cursor and an icon and use those instead of system cursor. Fixes tests on Windows. svn path=/trunk/; revision=50965 --- diff --git a/rostests/apitests/user32/CMakeLists.txt b/rostests/apitests/user32/CMakeLists.txt index 12fb0e40deb..e11fdf4558c 100644 --- a/rostests/apitests/user32/CMakeLists.txt +++ b/rostests/apitests/user32/CMakeLists.txt @@ -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) diff --git a/rostests/apitests/user32/GetIconInfo.c b/rostests/apitests/user32/GetIconInfo.c index deef6a3b6df..eb0568a21af 100644 --- a/rostests/apitests/user32/GetIconInfo.c +++ b/rostests/apitests/user32/GetIconInfo.c @@ -2,7 +2,7 @@ #include #include #include - +#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"); diff --git a/rostests/apitests/user32/resource.h b/rostests/apitests/user32/resource.h new file mode 100644 index 00000000000..1fbdfca579c --- /dev/null +++ b/rostests/apitests/user32/resource.h @@ -0,0 +1,3 @@ + + +#define IDI_TEST 1000 diff --git a/rostests/apitests/user32/test.cur b/rostests/apitests/user32/test.cur new file mode 100644 index 00000000000..1a70b67c9c1 Binary files /dev/null and b/rostests/apitests/user32/test.cur differ diff --git a/rostests/apitests/user32/test.ico b/rostests/apitests/user32/test.ico new file mode 100644 index 00000000000..6630ca1b5ce Binary files /dev/null and b/rostests/apitests/user32/test.ico differ diff --git a/rostests/apitests/user32/user32_apitest.rbuild b/rostests/apitests/user32/user32_apitest.rbuild index 251ad031870..8aaa1dfb4ee 100644 --- a/rostests/apitests/user32/user32_apitest.rbuild +++ b/rostests/apitests/user32/user32_apitest.rbuild @@ -8,6 +8,7 @@ user32 pseh testlist.c + user32_apitest.rc InitializeLpkHooks.c RealGetWindowClass.c diff --git a/rostests/apitests/user32/user32_apitest.rc b/rostests/apitests/user32/user32_apitest.rc new file mode 100644 index 00000000000..8c40b58552d --- /dev/null +++ b/rostests/apitests/user32/user32_apitest.rc @@ -0,0 +1,7 @@ +#include +#include "resource.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +IDI_TEST ICON "test.ico" +TESTCURSOR CURSOR "test.cur"