Add one more test for SetDCPenColor

svn path=/trunk/; revision=40307
This commit is contained in:
Timo Kreuzer 2009-04-01 02:02:21 +00:00
parent 189fc82964
commit 0bbce9519c

View file

@ -2,6 +2,7 @@ INT
Test_SetDCPenColor(PTESTINFO pti)
{
HDC hScreenDC, hDC;
HBITMAP hbmp;
// Test an incorrect DC
SetLastError(ERROR_SUCCESS);
@ -33,6 +34,16 @@ Test_SetDCPenColor(PTESTINFO pti)
SetDCPenColor(hDC, CLR_INVALID);
RTEST(SetDCPenColor(hDC, RGB(0,0,0)) == CLR_INVALID);
hbmp = CreateBitmap(10, 10, 1, 32, NULL);
ASSERT(hbmp);
SelectObject(hDC, hbmp);
SelectObject(hDC, GetStockObject(DC_PEN));
SetDCPenColor(hDC, 0x123456);
MoveToEx(hDC, 0, 0, NULL);
LineTo(hDC, 10, 0);
TEST(GetPixel(hDC, 5, 0) == 0x123456);
// Delete the DC
DeleteDC(hDC);