[ros-diffs] [greatlrd] 28279: 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

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sat Aug 11 10:52:39 CEST 2007


Author: greatlrd
Date: Sat Aug 11 12:52:38 2007
New Revision: 28279

URL: http://svn.reactos.org/svn/reactos?rev=28279&view=rev
Log:
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 

Modified:
    trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c
    trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c
    trunk/rostests/apitests/w32knapi/testlist.c
    trunk/rostests/apitests/w32knapi/w32knapi.c

Modified: trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c?rev=28279&r1=28278&r2=28279&view=diff
==============================================================================
--- trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c (original)
+++ trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c Sat Aug 11 12:52:38 2007
@@ -1,4 +1,5 @@
 #include "../w32knapi.h"
+
 
 W32KAPI
 HANDLE
@@ -13,14 +14,17 @@
 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;
 }

Modified: trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c?rev=28279&r1=28278&r2=28279&view=diff
==============================================================================
--- trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c (original)
+++ trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c Sat Aug 11 12:52:38 2007
@@ -13,7 +13,19 @@
 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;
 }

Modified: trunk/rostests/apitests/w32knapi/testlist.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/testlist.c?rev=28279&r1=28278&r2=28279&view=diff
==============================================================================
--- trunk/rostests/apitests/w32knapi/testlist.c (original)
+++ trunk/rostests/apitests/w32knapi/testlist.c Sat Aug 11 12:52:38 2007
@@ -20,8 +20,9 @@
 {
 	/* DirectDraw */
 	{ L"NtGdiDdCreateDirectDrawObject", Test_NtGdiDdCreateDirectDrawObject },
+	{ L"NtGdiDdQueryDirectDrawObject", Test_NtGdiDdQueryDirectDrawObject },
 	{ L"NtGdiDdDeleteDirectDrawObject", Test_NtGdiDdDeleteDirectDrawObject },
-	{ L"NtGdiDdQueryDirectDrawObject", Test_NtGdiDdQueryDirectDrawObject },
+
 
 	/* ntgdi */
 	{ L"NtGdiArcInternal", Test_NtGdiArcInternal },

Modified: trunk/rostests/apitests/w32knapi/w32knapi.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/w32knapi.c?rev=28279&r1=28278&r2=28279&view=diff
==============================================================================
--- trunk/rostests/apitests/w32knapi/w32knapi.c (original)
+++ trunk/rostests/apitests/w32knapi/w32knapi.c Sat Aug 11 12:52:38 2007
@@ -153,7 +153,7 @@
 	printf("Win32k native API test\n");
 
 	/* Convert to gui thread */
-	IsGUIThread(TRUE);
+	// IsGUIThread(TRUE); <- does not exists on win2k
 
 	if (!InitOsVersion())
 	{




More information about the Ros-diffs mailing list