Author: jgardou
Date: Thu Oct 23 11:19:21 2014
New Revision: 64916
URL:
http://svn.reactos.org/svn/reactos?rev=64916&view=rev
Log:
[USER32_APITEST]
- Add a test showing that CopyImage accepts LR_SHARED flag.
CORE-7575
Modified:
trunk/rostests/apitests/user32/LoadImage.c
Modified: trunk/rostests/apitests/user32/LoadImage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/LoadImage…
==============================================================================
--- trunk/rostests/apitests/user32/LoadImage.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/user32/LoadImage.c [iso-8859-1] Thu Oct 23 11:19:21 2014
@@ -39,11 +39,27 @@
hCopy = CopyImage(arg, IMAGE_CURSOR, 0, 0, 0);
ok(hCopy != NULL, "\n");
ok(DestroyIcon(hCopy), "\n");
+ /* Unlike the original, this one is not shared */
+ ok(!DestroyIcon(hCopy), "\n");
hCopy = CopyImage(arg, IMAGE_CURSOR, 0, 0, LR_COPYFROMRESOURCE);
ok(hCopy != NULL, "\n");
ok(DestroyIcon(hCopy), "\n");
+ /* Unlike the original, this one is not shared */
+ ok(!DestroyIcon(hCopy), "\n");
+
+ hCopy = CopyImage(arg, IMAGE_CURSOR, 0, 0, LR_COPYFROMRESOURCE | LR_SHARED);
+ ok(hCopy != NULL, "\n");
+ ok(DestroyIcon(hCopy), "\n");
+ /* This one is shared */
+ ok(DestroyIcon(hCopy), "\n");
+ hCopy = CopyImage(arg, IMAGE_CURSOR, 0, 0, LR_SHARED);
+ ok(hCopy != NULL, "\n");
+ ok(DestroyIcon(hCopy), "\n");
+ /* This one is shared */
+ ok(DestroyIcon(hCopy), "\n");
+
/* Try various usual functions */
hdcScreen = CreateDCW(L"DISPLAY", NULL, NULL, NULL);
ok(hdcScreen != NULL, "\n");