mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 15:46:13 +00:00
Add basic tests for BeginPath andd SetMapMode
svn path=/trunk/; revision=36691
This commit is contained in:
parent
049bf94d41
commit
f5cbabe20c
3 changed files with 62 additions and 8 deletions
34
rostests/apitests/gdi32api/tests/SetMapMode.c
Normal file
34
rostests/apitests/gdi32api/tests/SetMapMode.c
Normal file
|
@ -0,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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue