Huw Davies : gdi32/tests: Add tests for GetPixel.
Alexandre Julliard
julliard at winehq.org
Wed Oct 19 14:05:26 CDT 2011
Module: wine
Branch: master
Commit: 2e724343406e96a7ea1907d46490a69e7c3ab022
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2e724343406e96a7ea1907d46490a69e7c3ab022
Author: Huw Davies <huw at codeweavers.com>
Date: Wed Oct 19 12:41:59 2011 +0100
gdi32/tests: Add tests for GetPixel.
---
dlls/gdi32/tests/dib.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/dlls/gdi32/tests/dib.c b/dlls/gdi32/tests/dib.c
index f440420..844ccef 100644
--- a/dlls/gdi32/tests/dib.c
+++ b/dlls/gdi32/tests/dib.c
@@ -1990,11 +1990,22 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh
for (i = 0; i < 256; i++)
{
- COLORREF s;
+ COLORREF s, g;
s = SetPixel( hdc, i * 2, 10, DIBINDEX(i) );
+ g = GetPixel( hdc, i * 2, 10 );
+ ok( s == g, "got %08x and %08x\n", s, g );
+
s = SetPixel( hdc, i * 2, 20, PALETTEINDEX(i) );
+ g = GetPixel( hdc, i * 2, 20 );
+ ok( s == g, "got %08x and %08x\n", s, g );
+
s = SetPixel( hdc, i * 2, 30, RGB( (i & 0x07) << 5, (i & 0x38) << 2, i & 0xc0 ) );
+ g = GetPixel( hdc, i * 2, 30 );
+ ok( s == g, "got %08x and %08x\n", s, g );
+
s = SetPixel( hdc, i * 2, 40, PALETTERGB( (i & 0x07) << 5, (i & 0x38) << 2, i & 0xc0 ) );
+ g = GetPixel( hdc, i * 2, 40 );
+ ok( s == g, "got %08x and %08x\n", s, g );
}
compare_hash(bmi, bits, sha1, "SetPixel");
More information about the wine-cvs
mailing list