mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +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
4 changed files with 23 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "../w32knapi.h"
|
||||
|
||||
|
||||
W32KAPI
|
||||
HANDLE
|
||||
APIENTRY
|
||||
|
@ -13,14 +14,17 @@ NtGdiDdCreateDirectDrawObject(
|
|||
INT
|
||||
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);
|
||||
|
||||
/* Test ReactX */
|
||||
RTEST(NtGdiDdCreateDirectDrawObject(NULL) == NULL);
|
||||
RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL);
|
||||
|
||||
TEST(NtGdiDdCreateDirectDrawObject(hdc) != NULL);
|
||||
|
||||
/* Cleanup ReactX setup */
|
||||
DeleteDC(hdc);
|
||||
Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw);
|
||||
|
||||
return APISTATUS_NORMAL;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,19 @@ NtGdiDdDeleteDirectDrawObject(
|
|||
INT
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ TESTENTRY TestList[] =
|
|||
{
|
||||
/* DirectDraw */
|
||||
{ L"NtGdiDdCreateDirectDrawObject", Test_NtGdiDdCreateDirectDrawObject },
|
||||
{ L"NtGdiDdDeleteDirectDrawObject", Test_NtGdiDdDeleteDirectDrawObject },
|
||||
{ L"NtGdiDdQueryDirectDrawObject", Test_NtGdiDdQueryDirectDrawObject },
|
||||
{ L"NtGdiDdDeleteDirectDrawObject", Test_NtGdiDdDeleteDirectDrawObject },
|
||||
|
||||
|
||||
/* ntgdi */
|
||||
{ L"NtGdiArcInternal", Test_NtGdiArcInternal },
|
||||
|
|
|
@ -153,7 +153,7 @@ WinMain(HINSTANCE hInstance,
|
|||
printf("Win32k native API test\n");
|
||||
|
||||
/* Convert to gui thread */
|
||||
IsGUIThread(TRUE);
|
||||
// IsGUIThread(TRUE); <- does not exists on win2k
|
||||
|
||||
if (!InitOsVersion())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue