implemeted test for GdiConvertBitmap, GdiConvertBrush, GdiConvertDC, GdiConvertFont, GdiConvertPalette, GdiConvertRegion, GdiGetLocalBrush, GdiGetLocalDC

tested in xp/vista/reactos and works no fault report.

svn path=/trunk/; revision=33680
This commit is contained in:
Magnus Olsen 2008-05-24 22:20:31 +00:00
parent 1528124748
commit 287182ff5f
10 changed files with 117 additions and 4 deletions

View file

@ -200,4 +200,14 @@ typedef struct
// RECT VisRectRegion; // 1b8
} DC_ATTR, *PDC_ATTR;
HDC WINAPI GdiConvertBitmap(HDC hdc);
HBRUSH WINAPI GdiConvertBrush(HBRUSH hbr);
HDC WINAPI GdiConvertDC(HDC hdc);
HFONT WINAPI GdiConvertFont(HFONT hfont);
HPALETTE WINAPI GdiConvertPalette(HPALETTE hpal);
HRGN WINAPI GdiConvertRegion(HRGN hregion);
HBRUSH WINAPI GdiGetLocalBrush(HBRUSH hbr);
HDC WINAPI GdiGetLocalDC(HDC hdc);

View file

@ -12,11 +12,19 @@
#include "tests/CreatePen.c"
#include "tests/CreateRectRgn.c"
#include "tests/ExtCreatePen.c"
#include "tests/GdiConvertBitmap.c"
#include "tests/GdiConvertBrush.c"
#include "tests/GdiConvertDC.c"
#include "tests/GdiConvertFont.c"
#include "tests/GdiConvertPalette.c"
#include "tests/GdiConvertRegion.c"
#include "tests/GdiGetLocalBrush.c"
#include "tests/GdiGetLocalDC.c"
#include "tests/GetClipRgn.c"
#include "tests/GetCurrentObject.c"
#include "tests/GetDIBits.c"
#include "tests/GetObject.c"
#include "tests/GetStockObject.c"
#include "tests/GetDIBits.c"
#include "tests/SelectObject.c"
#include "tests/SetDCPenColor.c"
#include "tests/SetSysColors.c"
@ -24,25 +32,39 @@
/* The List of tests */
TESTENTRY TestList[] =
{
{ L"AddFontResourceA", Test_AddFontResourceA },
{ L"AddFontResourceEx", Test_AddFontResourceEx },
{ L"CreateBitmapIndirect", Test_CreateBitmapIndirect },
{ L"CreateBitmapIndirect", Test_CreateBitmapIndirect },
{ L"CreateCompatibleDC", Test_CreateCompatibleDC },
{ L"CreateFont", Test_CreateFont },
{ L"CreatePen", Test_CreatePen },
{ L"CreateRectRgn", Test_CreateRectRgn },
{ L"ExtCreatePen", Test_ExtCreatePen },
{ L"GdiConvertBitmap", Test_GdiConvertBitmap },
{ L"GdiConvertBrush", Test_GdiConvertBrush },
{ L"GdiConvertBrush", Test_GdiConvertDC },
{ L"GdiConvertFont", Test_GdiConvertFont },
{ L"GdiConvertPalette", Test_GdiConvertPalette },
{ L"GdiConvertRegion", Test_GdiConvertRegion },
{ L"GdiGetLocalBrush", Test_GdiGetLocalBrush },
{ L"GdiGetLocalDC", Test_GdiGetLocalDC },
{ L"GetClipRgn", Test_GetClipRgn },
{ L"GetCurrentObject", Test_GetCurrentObject },
{ L"GetDIBits", Test_GetDIBits },
{ L"GetObject", Test_GetObject },
{ L"GetStockObject", Test_GetStockObject },
{ L"GetDIBits", Test_GetDIBits },
{ L"SetSysColors", Test_SetSysColors },
{ L"SelectObject", Test_SelectObject },
{ L"SetDCPenColor", Test_SetDCPenColor },
{ L"SetSysColors", Test_SetSysColors },
{ L"SetWorldTransform", Test_SetWorldTransform },
};

View file

@ -0,0 +1,10 @@
INT
Test_GdiConvertBitmap(PTESTINFO pti)
{
RTEST(GdiConvertBitmap((HDC)-1) == (HDC)-1);
RTEST(GdiConvertBitmap((HDC)0) == (HDC)0);
RTEST(GdiConvertBitmap((HDC)1) == (HDC)1);
RTEST(GdiConvertBitmap((HDC)2) == (HDC)2);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,9 @@
INT
Test_GdiConvertBrush(PTESTINFO pti)
{
RTEST(GdiConvertBrush((HBRUSH)-1) == (HBRUSH)-1);
RTEST(GdiConvertBrush((HBRUSH)0) == (HBRUSH)0);
RTEST(GdiConvertBrush((HBRUSH)1) == (HBRUSH)1);
RTEST(GdiConvertBrush((HBRUSH)2) == (HBRUSH)2);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,10 @@
INT
Test_GdiConvertDC(PTESTINFO pti)
{
RTEST(GdiConvertDC((HDC)-1) == (HDC)-1);
RTEST(GdiConvertDC((HDC)0) == (HDC)0);
RTEST(GdiConvertDC((HDC)1) == (HDC)1);
RTEST(GdiConvertDC((HDC)2) == (HDC)2);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,9 @@
INT
Test_GdiConvertFont(PTESTINFO pti)
{
RTEST(GdiConvertFont((HFONT)-1) == (HFONT)-1);
RTEST(GdiConvertFont((HFONT)0) == (HFONT)0);
RTEST(GdiConvertFont((HFONT)1) == (HFONT)1);
RTEST(GdiConvertFont((HFONT)2) == (HFONT)2);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,9 @@
INT
Test_GdiConvertPalette(PTESTINFO pti)
{
RTEST(GdiConvertPalette((HPALETTE)-1) == (HPALETTE)-1);
RTEST(GdiConvertPalette((HPALETTE)0) == (HPALETTE)0);
RTEST(GdiConvertPalette((HPALETTE)1) == (HPALETTE)1);
RTEST(GdiConvertPalette((HPALETTE)2) == (HPALETTE)2);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,12 @@
INT
Test_GdiConvertRegion(PTESTINFO pti)
{
RTEST(GdiConvertRegion((HRGN)-1) == (HRGN)-1);
RTEST(GdiConvertRegion((HRGN)0) == (HRGN)0);
RTEST(GdiConvertRegion((HRGN)1) == (HRGN)1);
RTEST(GdiConvertRegion((HRGN)2) == (HRGN)2);
RTEST(GdiConvertRegion((HRGN)3) == (HRGN)3);
RTEST(GdiConvertRegion((HRGN)4) == (HRGN)4);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,11 @@
INT
Test_GdiGetLocalBrush(PTESTINFO pti)
{
RTEST(GdiGetLocalBrush((HBRUSH)-1) == (HBRUSH)-1);
RTEST(GdiGetLocalBrush((HBRUSH)0) == (HBRUSH)0);
RTEST(GdiGetLocalBrush((HBRUSH)1) == (HBRUSH)1);
RTEST(GdiGetLocalBrush((HBRUSH)2) == (HBRUSH)2);
RTEST(GdiGetLocalBrush((HBRUSH)3) == (HBRUSH)3);
RTEST(GdiGetLocalBrush((HBRUSH)4) == (HBRUSH)4);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,11 @@
INT
Test_GdiGetLocalDC(PTESTINFO pti)
{
RTEST(GdiGetLocalDC((HDC)-1) == (HDC)-1);
RTEST(GdiGetLocalDC((HDC)0) == (HDC)0);
RTEST(GdiGetLocalDC((HDC)1) == (HDC)1);
RTEST(GdiGetLocalDC((HDC)2) == (HDC)2);
RTEST(GdiGetLocalDC((HDC)3) == (HDC)3);
RTEST(GdiGetLocalDC((HDC)4) == (HDC)4);
return APISTATUS_NORMAL;
}