Alexandre Julliard : gdiplus/tests: Don't cast pointers to integers.
Alexandre Julliard
julliard at winehq.org
Thu Dec 4 09:02:20 CST 2008
Module: wine
Branch: master
Commit: dbee72d568f4d74fcafbda17cad4ce301da5db95
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dbee72d568f4d74fcafbda17cad4ce301da5db95
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Dec 4 12:13:01 2008 +0100
gdiplus/tests: Don't cast pointers to integers.
---
dlls/gdiplus/tests/image.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 4d93da4..6000dde 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -42,20 +42,17 @@ static void test_Scan0(void)
bm = (GpBitmap*)0xdeadbeef;
stat = GdipCreateBitmapFromScan0(10, -10, 10, PixelFormat24bppRGB, NULL, &bm);
expect(InvalidParameter, stat);
-
- expect(NULL, bm);
+ ok( !bm, "expected null bitmap\n" );
bm = (GpBitmap*)0xdeadbeef;
stat = GdipCreateBitmapFromScan0(-10, 10, 10, PixelFormat24bppRGB, NULL, &bm);
expect(InvalidParameter, stat);
-
- expect(NULL, bm);
+ ok( !bm, "expected null bitmap\n" );
bm = (GpBitmap*)0xdeadbeef;
stat = GdipCreateBitmapFromScan0(10, 0, 10, PixelFormat24bppRGB, NULL, &bm);
expect(InvalidParameter, stat);
-
- expect(NULL, bm);
+ ok( !bm, "expected null bitmap\n" );
bm = NULL;
stat = GdipCreateBitmapFromScan0(10, 10, 12, PixelFormat24bppRGB, buff, &bm);
@@ -67,12 +64,12 @@ static void test_Scan0(void)
bm = (GpBitmap*) 0xdeadbeef;
stat = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat24bppRGB, buff, &bm);
expect(InvalidParameter, stat);
- expect(NULL, bm);
+ ok( !bm, "expected null bitmap\n" );
bm = (GpBitmap*)0xdeadbeef;
stat = GdipCreateBitmapFromScan0(10, 10, 0, PixelFormat24bppRGB, buff, &bm);
expect(InvalidParameter, stat);
- expect(0xdeadbeef, bm);
+ ok( bm == (GpBitmap*)0xdeadbeef, "expected deadbeef bitmap\n" );
bm = NULL;
stat = GdipCreateBitmapFromScan0(10, 10, -8, PixelFormat24bppRGB, buff, &bm);
@@ -86,7 +83,7 @@ static void test_Scan0(void)
bm = (GpBitmap*)0xdeadbeef;
stat = GdipCreateBitmapFromScan0(10, 10, -10, PixelFormat24bppRGB, buff, &bm);
expect(InvalidParameter, stat);
- expect(NULL, bm);
+ ok( !bm, "expected null bitmap\n" );
}
static void test_GetImageDimension(void)
More information about the wine-cvs
mailing list