Michael Stefaniuc : comctl32/tests: Add an ImageList_Copy() test.
Alexandre Julliard
julliard at winehq.org
Wed Apr 5 16:17:07 CDT 2017
Module: wine
Branch: master
Commit: a6a9ec4459d1ba912b4ce13671fe8ba0bfe531ee
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a6a9ec4459d1ba912b4ce13671fe8ba0bfe531ee
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Wed Apr 5 15:25:44 2017 +0200
comctl32/tests: Add an ImageList_Copy() test.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/tests/imagelist.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index 2b68b63..8cdef18 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -2216,6 +2216,29 @@ static void test_color_table(UINT ilc)
ImageList_Destroy(himl);
}
+static void test_copy(void)
+{
+ HIMAGELIST dst, src;
+ BOOL ret;
+ int count;
+
+ dst = ImageList_Create(5, 11, ILC_COLOR, 1, 1);
+ count = ImageList_GetImageCount(dst);
+ ok(!count, "ImageList not empty.\n");
+ src = createImageList(7, 13);
+ count = ImageList_GetImageCount(src);
+ ok(count > 2, "Tests need an ImageList with more than 2 images\n");
+
+ /* ImageList_Copy() cannot copy between two ImageLists */
+ ret = ImageList_Copy(dst, 0, src, 2, ILCF_MOVE);
+ ok(!ret, "ImageList_Copy() should have returned FALSE\n");
+ count = ImageList_GetImageCount(dst);
+ ok(count == 0, "Expected no image in dst ImageList, got %d\n", count);
+
+ ImageList_Destroy(dst);
+ ImageList_Destroy(src);
+}
+
static void test_IImageList_Clone(void)
{
IImageList *imgl, *imgl2;
@@ -2366,6 +2389,7 @@ START_TEST(imagelist)
test_iconsize();
test_color_table(ILC_COLOR4);
test_color_table(ILC_COLOR8);
+ test_copy();
FreeLibrary(hComCtl32);
More information about the wine-cvs
mailing list