From 85e942f9519c3c89996a2d386b6caf266d9153d3 Mon Sep 17 00:00:00 2001 From: Felix Nawothnig Date: Mon, 27 Jun 2005 11:09:52 +0000 Subject: [PATCH] Report a todo and skip DIB tests when they fail at a non-truecolor screen depth. --- dlls/gdi/tests/bitmap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/gdi/tests/bitmap.c b/dlls/gdi/tests/bitmap.c index 49e6d66e6f8..dbbb81b8068 100644 --- a/dlls/gdi/tests/bitmap.c +++ b/dlls/gdi/tests/bitmap.c @@ -160,8 +160,12 @@ static void test_createdibitmap(void) } #define test_color_todo(got, exp, txt, todo) \ - if (todo) todo_wine { ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp); } \ - else ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp) + if (!todo && got != exp && screen_depth < 24) { \ + todo_wine ok(0, #txt " failed at %d-bit screen depth: got 0x%06x expected 0x%06x - skipping DIB tests\n", \ + screen_depth, (UINT)got, (UINT)exp); \ + return; \ + } else if (todo) todo_wine { ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp); } \ + else ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp) \ #define test_color(hdc, color, exp, todo_setp, todo_getp) \ { \ @@ -192,8 +196,10 @@ static void test_dibsections(void) HPALETTE hpal, oldpal; COLORREF c0, c1; int i; + int screen_depth; hdc = GetDC(0); + screen_depth = GetDeviceCaps(hdc, BITSPIXEL) * GetDeviceCaps(hdc, PLANES); memset(pbmi, 0, sizeof(bmibuf)); pbmi->bmiHeader.biSize = sizeof(pbmi->bmiHeader); pbmi->bmiHeader.biHeight = 16; -- 2.11.4.GIT