Adam Petaccia : gdiplus: Test GdipCloneImage.
Alexandre Julliard
julliard at winehq.org
Wed Jul 2 06:03:40 CDT 2008
Module: wine
Branch: master
Commit: de5b4d7c7fca07d0389a5fae4c09d03b540ea8fa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=de5b4d7c7fca07d0389a5fae4c09d03b540ea8fa
Author: Adam Petaccia <adam at tpetaccia.com>
Date: Tue Jul 1 21:04:10 2008 -0400
gdiplus: Test GdipCloneImage.
---
dlls/gdiplus/tests/image.c | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 686fe54..38a58b9 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -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);
}
More information about the wine-cvs
mailing list