[ros-diffs] [tkreuzer] 40307: Add one more test for SetDCPenColor

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Wed Apr 1 04:02:22 CEST 2009


Author: tkreuzer
Date: Wed Apr  1 06:02:21 2009
New Revision: 40307

URL: http://svn.reactos.org/svn/reactos?rev=40307&view=rev
Log:
Add one more test for SetDCPenColor

Modified:
    trunk/rostests/apitests/gdi32api/tests/SetDCPenColor.c

Modified: trunk/rostests/apitests/gdi32api/tests/SetDCPenColor.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/SetDCPenColor.c?rev=40307&r1=40306&r2=40307&view=diff
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/SetDCPenColor.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32api/tests/SetDCPenColor.c [iso-8859-1] Wed Apr  1 06:02:21 2009
@@ -2,6 +2,7 @@
 Test_SetDCPenColor(PTESTINFO pti)
 {
 	HDC hScreenDC, hDC;
+	HBITMAP hbmp;
 
 	// Test an incorrect DC
 	SetLastError(ERROR_SUCCESS);
@@ -33,6 +34,16 @@
 	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);
 



More information about the Ros-diffs mailing list