mirror of
https://github.com/reactos/reactos.git
synced 2024-10-07 18:04:41 +00:00
Adding dx test from my win32kdxtest to win32knapi test.
win32kdxtest are more like a analysis tools to examine some struct and dumping it, win32knapi is true test tools svn path=/trunk/; revision=28279
This commit is contained in:
parent
56edf011f1
commit
58272e652f
|
@ -1,5 +1,6 @@
|
||||||
#include "../w32knapi.h"
|
#include "../w32knapi.h"
|
||||||
|
|
||||||
|
|
||||||
W32KAPI
|
W32KAPI
|
||||||
HANDLE
|
HANDLE
|
||||||
APIENTRY
|
APIENTRY
|
||||||
|
@ -13,14 +14,17 @@ NtGdiDdCreateDirectDrawObject(
|
||||||
INT
|
INT
|
||||||
Test_NtGdiDdCreateDirectDrawObject(PTESTINFO pti)
|
Test_NtGdiDdCreateDirectDrawObject(PTESTINFO pti)
|
||||||
{
|
{
|
||||||
HDC hdc = CreateDCW(L"Display",NULL,NULL,NULL);
|
HANDLE hDirectDraw;
|
||||||
|
HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
|
||||||
ASSERT1(hdc != NULL);
|
ASSERT1(hdc != NULL);
|
||||||
|
|
||||||
|
/* Test ReactX */
|
||||||
RTEST(NtGdiDdCreateDirectDrawObject(NULL) == NULL);
|
RTEST(NtGdiDdCreateDirectDrawObject(NULL) == NULL);
|
||||||
|
RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL);
|
||||||
|
|
||||||
TEST(NtGdiDdCreateDirectDrawObject(hdc) != NULL);
|
/* Cleanup ReactX setup */
|
||||||
|
|
||||||
DeleteDC(hdc);
|
DeleteDC(hdc);
|
||||||
|
Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw);
|
||||||
|
|
||||||
return APISTATUS_NORMAL;
|
return APISTATUS_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,19 @@ NtGdiDdDeleteDirectDrawObject(
|
||||||
INT
|
INT
|
||||||
Test_NtGdiDdDeleteDirectDrawObject(PTESTINFO pti)
|
Test_NtGdiDdDeleteDirectDrawObject(PTESTINFO pti)
|
||||||
{
|
{
|
||||||
TEST(NtGdiDdDeleteDirectDrawObject(NULL) == 0);
|
HANDLE hDirectDraw;
|
||||||
|
HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
|
||||||
|
ASSERT1(hdc != NULL);
|
||||||
|
|
||||||
|
/* Test ReactX */
|
||||||
|
RTEST(NtGdiDdDeleteDirectDrawObject(NULL) == FALSE);
|
||||||
|
RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL);
|
||||||
|
ASSERT1(hDirectDraw != NULL);
|
||||||
|
RTEST(NtGdiDdDeleteDirectDrawObject(hDirectDraw) == TRUE);
|
||||||
|
|
||||||
|
/* Cleanup ReactX setup */
|
||||||
|
DeleteDC(hdc);
|
||||||
|
Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw);
|
||||||
|
|
||||||
return APISTATUS_NORMAL;
|
return APISTATUS_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,9 @@ TESTENTRY TestList[] =
|
||||||
{
|
{
|
||||||
/* DirectDraw */
|
/* DirectDraw */
|
||||||
{ L"NtGdiDdCreateDirectDrawObject", Test_NtGdiDdCreateDirectDrawObject },
|
{ L"NtGdiDdCreateDirectDrawObject", Test_NtGdiDdCreateDirectDrawObject },
|
||||||
{ L"NtGdiDdDeleteDirectDrawObject", Test_NtGdiDdDeleteDirectDrawObject },
|
|
||||||
{ L"NtGdiDdQueryDirectDrawObject", Test_NtGdiDdQueryDirectDrawObject },
|
{ L"NtGdiDdQueryDirectDrawObject", Test_NtGdiDdQueryDirectDrawObject },
|
||||||
|
{ L"NtGdiDdDeleteDirectDrawObject", Test_NtGdiDdDeleteDirectDrawObject },
|
||||||
|
|
||||||
|
|
||||||
/* ntgdi */
|
/* ntgdi */
|
||||||
{ L"NtGdiArcInternal", Test_NtGdiArcInternal },
|
{ L"NtGdiArcInternal", Test_NtGdiArcInternal },
|
||||||
|
|
|
@ -153,7 +153,7 @@ WinMain(HINSTANCE hInstance,
|
||||||
printf("Win32k native API test\n");
|
printf("Win32k native API test\n");
|
||||||
|
|
||||||
/* Convert to gui thread */
|
/* Convert to gui thread */
|
||||||
IsGUIThread(TRUE);
|
// IsGUIThread(TRUE); <- does not exists on win2k
|
||||||
|
|
||||||
if (!InitOsVersion())
|
if (!InitOsVersion())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue