Author: tkreuzer Date: Wed Oct 8 05:58:41 2008 New Revision: 36691
URL: http://svn.reactos.org/svn/reactos?rev=36691&view=rev Log: Add basic tests for BeginPath andd SetMapMode
Added: trunk/rostests/apitests/gdi32api/tests/BeginPath.c (with props) trunk/rostests/apitests/gdi32api/tests/SetMapMode.c (with props) Modified: trunk/rostests/apitests/gdi32api/testlist.c
Modified: trunk/rostests/apitests/gdi32api/testlist.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/testlist... ============================================================================== --- trunk/rostests/apitests/gdi32api/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32api/testlist.c [iso-8859-1] Wed Oct 8 05:58:41 2008 @@ -6,6 +6,7 @@ /* include the tests */ #include "tests/AddFontResource.c" #include "tests/AddFontResourceEx.c" +#include "tests/BeginPath.c" #include "tests/CreateBitmapIndirect.c" #include "tests/CreateCompatibleDC.c" #include "tests/CreateFont.c" @@ -35,16 +36,9 @@ #include "tests/GetStockObject.c" #include "tests/SelectObject.c" #include "tests/SetDCPenColor.c" +#include "tests/SetMapMode.c" #include "tests/SetSysColors.c" #include "tests/SetWorldTransform.c" - - - - - - - -
/* The List of tests */ @@ -52,6 +46,7 @@ { { L"AddFontResourceA", Test_AddFontResourceA }, { L"AddFontResourceEx", Test_AddFontResourceEx }, + { L"BeginPath", Test_BeginPath }, { L"CreateBitmapIndirect", Test_CreateBitmapIndirect }, { L"CreateCompatibleDC", Test_CreateCompatibleDC }, { L"CreateFont", Test_CreateFont }, @@ -81,6 +76,7 @@ { L"GetStockObject", Test_GetStockObject }, { L"SelectObject", Test_SelectObject }, { L"SetDCPenColor", Test_SetDCPenColor }, + { L"SetMapMode", Test_SetMapMode }, { L"SetSysColors", Test_SetSysColors }, { L"SetWorldTransform", Test_SetWorldTransform }, };
Added: trunk/rostests/apitests/gdi32api/tests/BeginPath.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/Be... ============================================================================== --- trunk/rostests/apitests/gdi32api/tests/BeginPath.c (added) +++ trunk/rostests/apitests/gdi32api/tests/BeginPath.c [iso-8859-1] Wed Oct 8 05:58:41 2008 @@ -1,0 +1,24 @@ + + +INT +Test_BeginPath(PTESTINFO pti) +{ + HDC hDC; + BOOL ret; + + SetLastError(0); + ret = BeginPath(0); + TEST(ret == 0); + TEST(GetLastError() == ERROR_INVALID_HANDLE); + + hDC = CreateCompatibleDC(NULL); + + SetLastError(0); + ret = BeginPath(hDC); + TEST(ret == 1); + TEST(GetLastError() == 0); + + DeleteDC(hDC); + + return APISTATUS_NORMAL; +}
Propchange: trunk/rostests/apitests/gdi32api/tests/BeginPath.c ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/rostests/apitests/gdi32api/tests/SetMapMode.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/Se... ============================================================================== --- trunk/rostests/apitests/gdi32api/tests/SetMapMode.c (added) +++ trunk/rostests/apitests/gdi32api/tests/SetMapMode.c [iso-8859-1] Wed Oct 8 05:58:41 2008 @@ -1,0 +1,34 @@ + + + +INT +Test_SetMapMode(PTESTINFO pti) +{ + HDC hDC; + SIZE WindowExt, ViewportExt; + + hDC = CreateCompatibleDC(NULL); + ASSERT(hDC); + + GetWindowExtEx(hDC, &WindowExt); + GetViewportExtEx(hDC, &ViewportExt); + + ASSERT(WindowExt.cx == 1); + ASSERT(WindowExt.cy == 1); + ASSERT(ViewportExt.cx == 1); + ASSERT(ViewportExt.cy == 1); + + SetMapMode(hDC, MM_ISOTROPIC); + + GetWindowExtEx(hDC, &WindowExt); + GetViewportExtEx(hDC, &ViewportExt); + + TEST(WindowExt.cx == 3600); + TEST(WindowExt.cy == 2700); + TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); + TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); + + DeleteDC(hDC); + + return APISTATUS_NORMAL; +}
Propchange: trunk/rostests/apitests/gdi32api/tests/SetMapMode.c ------------------------------------------------------------------------------ svn:eol-style = native