From fee339f7ff9e3a46b6c9245c6df2943f0abd90e4 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Fri, 5 Dec 2008 10:51:46 +0100 Subject: [PATCH] gdi32/tests: Fix a few test failures on Win9x and WinMe. --- dlls/gdi32/tests/bitmap.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index 7ab8323a50d..7094f852dc2 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); } -- 2.11.4.GIT