Paul Vriens : gdi32/tests: Fix a few test failures on Win9x and WinMe.
Alexandre Julliard
julliard at winehq.org
Fri Dec 5 07:42:59 CST 2008
Module: wine
Branch: master
Commit: fee339f7ff9e3a46b6c9245c6df2943f0abd90e4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fee339f7ff9e3a46b6c9245c6df2943f0abd90e4
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Fri Dec 5 10:51:46 2008 +0100
gdi32/tests: Fix a few test failures on Win9x and WinMe.
---
dlls/gdi32/tests/bitmap.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c
index 7ab8323..7094f85 100644
--- a/dlls/gdi32/tests/bitmap.c
+++ b/dlls/gdi32/tests/bitmap.c
@@ -1956,11 +1956,17 @@ static void test_CreateBitmap(void)
bmp.bmPlanes = 1;
bmp.bmBitsPixel = i;
bmp.bmBits = NULL;
+ SetLastError(0xdeadbeef);
bm = CreateBitmapIndirect(&bmp);
if(i > 32) {
DWORD error = GetLastError();
- ok(bm == 0, "CreateBitmapIndirect for %d bpp succeeded\n", i);
- ok(error == ERROR_INVALID_PARAMETER, "Got error %d, expected ERROR_INVALID_PARAMETER\n", error);
+ ok(bm == 0 ||
+ broken(bm != 0), /* Win9x and WinMe */
+ "CreateBitmapIndirect for %d bpp succeeded\n", i);
+ ok(error == ERROR_INVALID_PARAMETER ||
+ broken(error == 0xdeadbeef), /* Win9x and WinME */
+ "Got error %d, expected ERROR_INVALID_PARAMETER\n", error);
+ DeleteObject(bm);
continue;
}
ok(bm != 0, "CreateBitmapIndirect error %u\n", GetLastError());
@@ -1978,7 +1984,9 @@ static void test_CreateBitmap(void)
} else if(i <= 32) {
expect = 32;
}
- ok(bmp.bmBitsPixel == expect, "CreateBitmapIndirect for a %d bpp bitmap created a %d bpp bitmap, expected %d\n",
+ ok(bmp.bmBitsPixel == expect ||
+ broken(bmp.bmBitsPixel == i), /* Win9x and WinMe */
+ "CreateBitmapIndirect for a %d bpp bitmap created a %d bpp bitmap, expected %d\n",
i, bmp.bmBitsPixel, expect);
DeleteObject(bm);
}
More information about the wine-cvs
mailing list