Huw Davies : gdi32/tests: win9x doesn' t return the correct number of colours used with dib sections created via DIB_PAL_COLORS .

Alexandre Julliard julliard at winehq.org
Mon Mar 9 09:40:41 CDT 2009


Module: wine
Branch: master
Commit: a88e6e018215933a39c8ab0e35cffb10e35875d9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a88e6e018215933a39c8ab0e35cffb10e35875d9

Author: Huw Davies <huw at codeweavers.com>
Date:   Mon Mar  9 12:09:32 2009 +0000

gdi32/tests: win9x doesn't return the correct number of colours used with dib sections created via DIB_PAL_COLORS.

---

 dlls/gdi32/tests/bitmap.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c
index b53d217..d25352e 100644
--- a/dlls/gdi32/tests/bitmap.c
+++ b/dlls/gdi32/tests/bitmap.c
@@ -721,7 +721,8 @@ static void test_dibsections(void)
     hdib = CreateDIBSection(hdc, pbmi, DIB_PAL_COLORS, (void**)&bits, NULL, 0);
     ok(hdib != NULL, "CreateDIBSection failed\n");
     ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n");
-    ok(dibsec.dsBmih.biClrUsed == 2,
+    ok(dibsec.dsBmih.biClrUsed == 2 ||
+       broken(dibsec.dsBmih.biClrUsed == 0), /* win9x */
         "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 2);
 
     /* The colour table has already been grabbed from the dc, so we select back the
@@ -813,7 +814,8 @@ static void test_dibsections(void)
     hdib = CreateDIBSection(hdc, pbmi, DIB_PAL_COLORS, (void**)&bits, NULL, 0);
     ok(hdib != NULL, "CreateDIBSection failed\n");
     ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n");
-    ok(dibsec.dsBmih.biClrUsed == 256,
+    ok(dibsec.dsBmih.biClrUsed == 256 ||
+       broken(dibsec.dsBmih.biClrUsed == 0), /* win9x */
         "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 256);
 
     test_dib_info(hdib, bits, &pbmi->bmiHeader);




More information about the wine-cvs mailing list