Lei Zhang : gdiplus: Add tests for passing negative strides to GdipCreateBitmapFromScan0.
Alexandre Julliard
julliard at winehq.org
Mon Jul 21 08:52:29 CDT 2008
Module: wine
Branch: master
Commit: 7a27f8b665e4bc23a448cc709de000baa42d4439
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7a27f8b665e4bc23a448cc709de000baa42d4439
Author: Lei Zhang <thestig at google.com>
Date: Fri Jul 18 15:31:58 2008 -0700
gdiplus: Add tests for passing negative strides to GdipCreateBitmapFromScan0.
---
dlls/gdiplus/tests/image.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 38a58b9..49d1e5e 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -73,6 +73,20 @@ static void test_Scan0(void)
stat = GdipCreateBitmapFromScan0(10, 10, 0, PixelFormat24bppRGB, buff, &bm);
expect(InvalidParameter, stat);
expect(0xdeadbeef, bm);
+
+ bm = NULL;
+ stat = GdipCreateBitmapFromScan0(10, 10, -8, PixelFormat24bppRGB, buff, &bm);
+ todo_wine{
+ expect(Ok, stat);
+ ok(NULL != bm, "Expected bitmap to be initialized\n");
+ }
+ if (stat == Ok)
+ GdipDisposeImage((GpImage*)bm);
+
+ bm = (GpBitmap*)0xdeadbeef;
+ stat = GdipCreateBitmapFromScan0(10, 10, -10, PixelFormat24bppRGB, buff, &bm);
+ expect(InvalidParameter, stat);
+ expect(NULL, bm);
}
static void test_GetImageDimension(void)
More information about the wine-cvs
mailing list