Author: tkreuzer
Date: Thu Mar 3 21:49:44 2011
New Revision: 50965
URL:
http://svn.reactos.org/svn/reactos?rev=50965&view=rev
Log:
[USER32_APITEST]
Add a cursor and an icon and use those instead of system cursor. Fixes tests on Windows.
Added:
trunk/rostests/apitests/user32/resource.h (with props)
trunk/rostests/apitests/user32/test.cur (with props)
trunk/rostests/apitests/user32/test.ico (with props)
trunk/rostests/apitests/user32/user32_apitest.rc (with props)
Modified:
trunk/rostests/apitests/user32/CMakeLists.txt
trunk/rostests/apitests/user32/GetIconInfo.c
trunk/rostests/apitests/user32/user32_apitest.rbuild
Modified: trunk/rostests/apitests/user32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/CMakeList…
==============================================================================
--- trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] Thu Mar 3 21:49:44 2011
@@ -9,7 +9,8 @@
GetSystemMetrics.c
GetIconInfo.c
GetPeekMessage.c
- testlist.c)
+ testlist.c
+ user32_apitest.rc)
add_executable(user32_apitest ${SOURCE})
target_link_libraries(user32_apitest wine)
Modified: trunk/rostests/apitests/user32/GetIconInfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/GetIconIn…
==============================================================================
--- trunk/rostests/apitests/user32/GetIconInfo.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/user32/GetIconInfo.c [iso-8859-1] Thu Mar 3 21:49:44 2011
@@ -2,7 +2,7 @@
#include <stdio.h>
#include <wine/test.h>
#include <windows.h>
-
+#include "resource.h"
// FIXME user32
@@ -144,12 +144,21 @@
Test_GetIconInfo(0);
Test_GetIconInfo(1);
- hcursor = LoadCursor(NULL, IDC_APPSTARTING);
+ 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 == 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 == 0, "\n");
- ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot);
- ok(iconinfo2.yHotspot == 8, "%ld\n", iconinfo2.yHotspot);
+ 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");
Added: trunk/rostests/apitests/user32/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/resource.…
==============================================================================
--- trunk/rostests/apitests/user32/resource.h (added)
+++ trunk/rostests/apitests/user32/resource.h [iso-8859-1] Thu Mar 3 21:49:44 2011
@@ -1,0 +1,3 @@
+
+
+#define IDI_TEST 1000
Propchange: trunk/rostests/apitests/user32/resource.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/user32/test.cur
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/test.cur?…
==============================================================================
Binary file - no diff available.
Propchange: trunk/rostests/apitests/user32/test.cur
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/rostests/apitests/user32/test.ico
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/test.ico?…
==============================================================================
Binary file - no diff available.
Propchange: trunk/rostests/apitests/user32/test.ico
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: trunk/rostests/apitests/user32/user32_apitest.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/user32_ap…
==============================================================================
--- trunk/rostests/apitests/user32/user32_apitest.rbuild [iso-8859-1] (original)
+++ trunk/rostests/apitests/user32/user32_apitest.rbuild [iso-8859-1] Thu Mar 3 21:49:44
2011
@@ -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>
Added: trunk/rostests/apitests/user32/user32_apitest.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/user32_ap…
==============================================================================
--- trunk/rostests/apitests/user32/user32_apitest.rc (added)
+++ trunk/rostests/apitests/user32/user32_apitest.rc [iso-8859-1] Thu Mar 3 21:49:44
2011
@@ -1,0 +1,7 @@
+#include <windows.h>
+#include "resource.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+IDI_TEST ICON "test.ico"
+TESTCURSOR CURSOR "test.cur"
Propchange: trunk/rostests/apitests/user32/user32_apitest.rc
------------------------------------------------------------------------------
svn:eol-style = native