mirror of
https://github.com/reactos/reactos.git
synced 2024-09-20 01:31:34 +00:00
58c6a293bc
- add a gdi32 api test, based on the one in the win32 folder - add a user32 api test - change type of test functions to int - implement a quick 'n dirty html api status output - uncomment NtGdiTransormPoints in w32kdll.def - add ASSERT1 macro (ASSERT is already used) - include some more headers svn path=/trunk/; revision=28169
39 lines
904 B
C
39 lines
904 B
C
#include "../gdi32api.h"
|
|
|
|
INT
|
|
Test_CreateCompatibleDC(PTESTINFO pti)
|
|
{
|
|
HDC hDCScreen, hOldDC, hDC, hDC2;
|
|
|
|
// Create a DC
|
|
hDCScreen = GetDC(NULL);
|
|
if (hDCScreen == NULL)
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
hDC = CreateCompatibleDC(hDCScreen);
|
|
TEST(hDC != NULL);
|
|
|
|
// Test if first selected pen is BLACK_PEN (? or same as screen DC's pen?)
|
|
TEST(SelectObject(hDC, GetStockObject(DC_PEN)) == GetStockObject(BLACK_PEN));
|
|
TEST(SelectObject(hDC, GetStockObject(BLACK_PEN)) == GetStockObject(DC_PEN));
|
|
|
|
// Test for the starting Color == RGB(0,0,0)
|
|
TEST(SetDCPenColor(hDC, RGB(1,2,3)) == RGB(0,0,0));
|
|
|
|
// Check for reuse counter
|
|
hOldDC = hDC;
|
|
DeleteDC(hDC);
|
|
hDC = CreateCompatibleDC(hDCScreen);
|
|
hDC2 = CreateCompatibleDC(hOldDC);
|
|
TEST(hDC2 == NULL);
|
|
if (hDC2 != NULL) DeleteDC(hDC2);
|
|
|
|
// cleanup
|
|
DeleteDC(hDC);
|
|
|
|
ReleaseDC(NULL, hDCScreen);
|
|
return APISTATUS_NORMAL;
|
|
}
|