Commit de5b4d7c authored by Adam Petaccia's avatar Adam Petaccia Committed by Alexandre Julliard

gdiplus: Test GdipCloneImage.

parent af29f969
......@@ -478,6 +478,35 @@ static void test_GdipGetImageFlags(void)
expect(InvalidParameter, stat);
}
static void test_GdipCloneImage(void)
{
GpStatus stat;
GpRectF rectF;
GpUnit unit;
GpBitmap *bm;
GpImage *image_src, *image_dest = NULL;
const INT WIDTH = 10, HEIGHT = 20;
/* Create an image, clone it, delete the original, make sure the copy works */
stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm);
expect(Ok, stat);
todo_wine
{
image_src = ((GpImage*)bm);
stat = GdipCloneImage(image_src, &image_dest);
expect(Ok, stat);
}
stat = GdipDisposeImage((GpImage*)bm);
expect(Ok, stat);
todo_wine
{
stat = GdipGetImageBounds(image_dest, &rectF, &unit);
expect(Ok, stat);
stat = GdipDisposeImage(image_dest);
expect(Ok, stat);
}
}
START_TEST(image)
{
struct GdiplusStartupInput gdiplusStartupInput;
......@@ -499,6 +528,7 @@ START_TEST(image)
test_LockBits();
test_GdipCreateBitmapFromHBITMAP();
test_GdipGetImageFlags();
test_GdipCloneImage();
GdiplusShutdown(gdiplusToken);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment