gdi32/tests: Fix some test failures on old Windows versions.
This commit is contained in:
parent
810d215a3c
commit
38766d4d19
|
@ -4998,7 +4998,8 @@ static void test_SetDIBitsToDevice(void)
|
|||
int ent = (255 - idx) % pal->palNumEntries;
|
||||
DWORD expect = idx >= info->bmiHeader.biClrUsed ? 0 :
|
||||
(palent[ent].peRed << 16 | palent[ent].peGreen << 8 | palent[ent].peBlue);
|
||||
ok( dib_bits[i] == expect, "%d: got %08x instead of %08x\n", i, dib_bits[i], expect );
|
||||
ok( dib_bits[i] == expect || broken(dib_bits[i] == 0),
|
||||
"%d: got %08x instead of %08x\n", i, dib_bits[i], expect );
|
||||
}
|
||||
memset( dib_bits, 0xaa, 64 * 4 );
|
||||
|
||||
|
|
|
@ -953,6 +953,7 @@ static const char *sha1_graphics_1[] =
|
|||
"c14832e69ec3585c15987b3d69d5007236fa9814",
|
||||
"e44ea620b0c47125a34193537ab9d219a52ad028",
|
||||
"ef2db9fb75a672f69bab88e5d08fe64f50ec2bc4",
|
||||
"df81db2a9b3942a82e0dc5e57247b642f9b42702",
|
||||
"8819bf7a43295161fe045a42936000b3a51fe200",
|
||||
"e08dbc26469c229f75ccbf1a38a133401f270b84",
|
||||
"d1e6091caa4482d3142df3b958606c41ebf4698e",
|
||||
|
@ -1647,7 +1648,7 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh
|
|||
}
|
||||
}
|
||||
|
||||
compare_hash_broken_todo(bmi, bits, sha1, "1 bpp ddb brush patblt", dib_is_1bpp ? 2 : 0, dib_is_1bpp);
|
||||
compare_hash_broken_todo(bmi, bits, sha1, "1 bpp ddb brush patblt", dib_is_1bpp ? 3 : 0, dib_is_1bpp);
|
||||
memset(bits, 0xcc, dib_size);
|
||||
|
||||
DeleteObject(bmp);
|
||||
|
|
|
@ -159,25 +159,34 @@ static void test_halftone_palette(void)
|
|||
|
||||
pal = CreateHalftonePalette( hdc );
|
||||
count = GetPaletteEntries( pal, 0, 256, entries );
|
||||
ok( count == 256 || broken(count == 20), /* nt 4 */
|
||||
ok( count == 256 || broken(count <= 20), /* nt 4 */
|
||||
"wrong size %u\n", count );
|
||||
|
||||
/* first and last 10 match the default palette */
|
||||
for (i = 0; i < 10; i++)
|
||||
ok( entries[i].peRed == defpal[i].peRed &&
|
||||
entries[i].peGreen == defpal[i].peGreen &&
|
||||
entries[i].peBlue == defpal[i].peBlue &&
|
||||
!entries[i].peFlags,
|
||||
"%u: wrong color %02x,%02x,%02x,%02x\n", i,
|
||||
entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags );
|
||||
for (i = count - 10; i < count; i++)
|
||||
ok( entries[i].peRed == defpal[i - count + 20].peRed &&
|
||||
entries[i].peGreen == defpal[i - count + 20].peGreen &&
|
||||
entries[i].peBlue == defpal[i - count + 20].peBlue &&
|
||||
!entries[i].peFlags,
|
||||
"%u: wrong color %02x,%02x,%02x,%02x\n", i,
|
||||
entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags );
|
||||
|
||||
if (count >= 20)
|
||||
{
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
ok( entries[i].peRed == defpal[i].peRed &&
|
||||
entries[i].peGreen == defpal[i].peGreen &&
|
||||
entries[i].peBlue == defpal[i].peBlue &&
|
||||
!entries[i].peFlags,
|
||||
"%u: wrong color %02x,%02x,%02x,%02x instead of %02x,%02x,%02x\n", i,
|
||||
entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags,
|
||||
defpal[i].peRed, defpal[i].peGreen, defpal[i].peBlue );
|
||||
}
|
||||
for (i = count - 10; i < count; i++)
|
||||
{
|
||||
int idx = i - count + 20;
|
||||
ok( entries[i].peRed == defpal[idx].peRed &&
|
||||
entries[i].peGreen == defpal[idx].peGreen &&
|
||||
entries[i].peBlue == defpal[idx].peBlue &&
|
||||
!entries[i].peFlags,
|
||||
"%u: wrong color %02x,%02x,%02x,%02x instead of %02x,%02x,%02x\n", i,
|
||||
entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags,
|
||||
defpal[idx].peRed, defpal[idx].peGreen, defpal[idx].peBlue );
|
||||
}
|
||||
}
|
||||
DeleteObject( pal );
|
||||
ReleaseDC( 0, hdc );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue