Author: greatlrd
Date: Fri Feb 16 23:14:24 2007
New Revision: 25824
URL:
http://svn.reactos.org/svn/reactos?rev=25824&view=rev
Log:
adding more test case for test_NtGdiDdQueryDirectDrawObject not complete yet
Modified:
trunk/rosapps/dxtest/win32kdxtest/main.c
Modified: trunk/rosapps/dxtest/win32kdxtest/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/dxtest/win32kdxtest/main.c…
==============================================================================
--- trunk/rosapps/dxtest/win32kdxtest/main.c (original)
+++ trunk/rosapps/dxtest/win32kdxtest/main.c Fri Feb 16 23:14:24 2007
@@ -1,3 +1,7 @@
+
+
+/* All testcase are base how windows 2000 sp4 acting */
+
#include <stdio.h>
/* SDK/DDK/NDK Headers. */
@@ -97,6 +101,25 @@
DWORD *puNumFourCC = NULL;
DWORD *puFourCC = NULL;
+ DD_HALINFO HalInfo;
+ DWORD CallBackFlags = 0;
+ D3DNTHAL_CALLBACKS D3dCallbacks;
+ D3DNTHAL_GLOBALDRIVERDATA D3dDriverData;
+ DD_D3DBUFCALLBACKS D3dBufferCallbacks;
+ DDSURFACEDESC D3dTextureFormats;
+ DWORD NumHeaps = 0;
+ VIDEOMEMORY vmList;
+ DWORD NumFourCC = 0;
+ DWORD FourCC = 0;
+
+ /* clear data */
+ memset(&vmList,0,sizeof(VIDEOMEMORY));
+ memset(&D3dTextureFormats,0,sizeof(DDSURFACEDESC));
+ memset(&D3dBufferCallbacks,0,sizeof(DD_D3DBUFCALLBACKS));
+ memset(&D3dDriverData,0,sizeof(D3DNTHAL_GLOBALDRIVERDATA));
+ memset(&D3dCallbacks,0,sizeof(D3DNTHAL_CALLBACKS));
+ memset(&HalInfo,0,sizeof(DD_HALINFO));
+
printf("Start testing of NtGdiDdQueryDirectDrawObject\n");
/* testing NULL */
@@ -106,7 +129,7 @@
puD3dTextureFormats, puNumHeaps,
puvmList, puNumFourCC,
puFourCC);
- testing_noteq(retValue,0,fails,"1. NtGdiDdQueryDirectDrawObject(NULL,
...);\0");
+ testing_noteq(retValue,FALSE,fails,"1. NtGdiDdQueryDirectDrawObject(NULL,
...);\0");
testing_noteq(pHalInfo,NULL,fails,"2. NtGdiDdQueryDirectDrawObject(NULL,
...);\0");
testing_noteq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(NULL,
...);\0");
testing_noteq(puD3dCallbacks,NULL,fails,"4. NtGdiDdQueryDirectDrawObject(NULL,
...);\0");
@@ -123,7 +146,7 @@
puvmList, puNumFourCC,
puFourCC);
- testing_noteq(retValue,0,fails,"1.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0");
+ testing_noteq(retValue,FALSE,fails,"1.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0");
testing_noteq(pHalInfo,NULL,fails,"2.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0");
testing_noteq(pCallBackFlags,NULL,fails,"3.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0");
testing_noteq(puD3dCallbacks,NULL,fails,"4.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0");
@@ -133,8 +156,29 @@
testing_noteq(puNumFourCC,NULL,fails,"8.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0");
testing_noteq(puFourCC,NULL,fails,"9.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0");
-
-
+ /*
+ * we expect the pHalInfo will be fill in and correct but we expect return value be
+ * false
+ */
+
+ pHalInfo = &HalInfo;
+ retValue = sysNtGdiDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+ pCallBackFlags, puD3dCallbacks,
+ puD3dDriverData, puD3dBufferCallbacks,
+ puD3dTextureFormats, puNumHeaps,
+ puvmList, puNumFourCC,
+ puFourCC);
+
+ testing_noteq(retValue,FALSE,fails,"1.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
+ testing_eq(pHalInfo,NULL,fails,"2.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
+ testing_noteq(pCallBackFlags,NULL,fails,"3.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
+ testing_noteq(puD3dCallbacks,NULL,fails,"4.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
+ testing_noteq(puD3dDriverData,NULL,fails,"5.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
+ testing_noteq(puD3dBufferCallbacks,NULL,fails,"6.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
+ testing_noteq(puD3dTextureFormats,NULL,fails,"7.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
+ testing_noteq(puNumFourCC,NULL,fails,"8.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
+ testing_noteq(puFourCC,NULL,fails,"9.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
+ testing_noteq(pHalInfo->dwSize,sizeof(DD_HALINFO),fails,"10.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0");
show_status(fails, "NtGdiDdQueryDirectDrawObject\0");
}