Author: greatlrd
Date: Sat Feb 24 16:32:09 2007
New Revision: 25900
URL:
http://svn.reactos.org/svn/reactos?rev=25900&view=rev
Log:
adding more testcase for NtGdiDdQueryDirectDrawObject
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 Sat Feb 24 16:32:09 2007
@@ -82,7 +82,7 @@
D3DNTHAL_CALLBACKS D3dCallbacks;
D3DNTHAL_GLOBALDRIVERDATA D3dDriverData;
DD_D3DBUFCALLBACKS D3dBufferCallbacks;
- DDSURFACEDESC D3dTextureFormats;
+ DDSURFACEDESC2 D3dTextureFormats[100];
// DWORD NumHeaps = 0;
VIDEOMEMORY vmList;
// DWORD NumFourCC = 0;
@@ -100,7 +100,7 @@
printf("Start testing of NtGdiDdQueryDirectDrawObject\n");
/* testing OsThunkDdQueryDirectDrawObject( NULL, .... */
- printf("testing OsThunkDdQueryDirectDrawObject( NULL, ....)\n");
+ printf("testing DdQueryDirectDrawObject( NULL, ....)\n");
retValue = OsThunkDdQueryDirectDrawObject( NULL, pHalInfo,
pCallBackFlags, puD3dCallbacks,
@@ -119,7 +119,7 @@
testing_noteq(puFourCC,NULL,fails,"9. NtGdiDdQueryDirectDrawObject(NULL,
...);\0");
/* testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, NULL, .... */
- printf("testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, NULL,
....)\n");
+ printf("testing DdQueryDirectDrawObject( hDD, NULL, ....)\n");
retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
pCallBackFlags, puD3dCallbacks,
@@ -139,7 +139,7 @@
testing_noteq(puFourCC,NULL,fails,"9.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0");
/* testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, NULL, ....
*/
- printf("testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
NULL, ....)\n");
+ printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, NULL, ....)\n");
pHalInfo = &HalInfo;
retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
@@ -163,12 +163,13 @@
(pHalInfo->dwSize != sizeof(DD_HALINFO_V4)))
{
printf("10. if this show for NT 2000/XP/2003 ignore it,
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\n");
+ fails++;
}
/* FIXME dump pHalInfo */
/* testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
pCallBackFlags, NULL, .... */
- printf("testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
pCallBackFlags, NULL, ....)\n");
+ printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, NULL,
....)\n");
pHalInfo = &HalInfo;
pCallBackFlags = CallBackFlags;
@@ -189,16 +190,100 @@
testing_noteq(puD3dDriverData,NULL,fails,"5.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL,
...);\0");
testing_noteq(puD3dBufferCallbacks,NULL,fails,"6.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL,
...);\0");
testing_noteq(puD3dTextureFormats,NULL,fails,"7.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, 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(puNumFourCC,NULL,fails,"8.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL,
...);\0");
+ testing_noteq(puFourCC,NULL,fails,"9.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL,
...);\0");
if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) &&
(pHalInfo->dwSize != sizeof(DD_HALINFO_V4)))
{
- printf("10. if this show for NT 2000/XP/2003 ignore it,
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\n");
+ printf("10. if this show for NT 2000/XP/2003 ignore it,
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL,
...);\n");
+ fails++;
}
/* FIXME dump pHalInfo */
/* FIXME dump pCallBackFlags */
+
+ /* testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
pCallBackFlags, NULL, .... */
+ printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags,
puD3dCallbacks, NULL, ....)\n");
+
+ pHalInfo = &HalInfo;
+ pCallBackFlags = CallBackFlags;
+ puD3dCallbacks = &D3dCallbacks;
+
+ RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
+ RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
+
+ retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+ pCallBackFlags, puD3dCallbacks,
+ puD3dDriverData, puD3dBufferCallbacks,
+ puD3dTextureFormats, puNumHeaps,
+ puvmList, puNumFourCC,
+ puFourCC);
+
+ testing_noteq(retValue,FALSE,fails,"1.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+ testing_eq(pHalInfo,NULL,fails,"2.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+ testing_eq(pCallBackFlags,NULL,fails,"3.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+ testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"4.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+
+ testing_noteq(puD3dDriverData,NULL,fails,"5.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+ testing_noteq(puD3dBufferCallbacks,NULL,fails,"6.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+ testing_noteq(puD3dTextureFormats,NULL,fails,"7.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+ testing_noteq(puNumFourCC,NULL,fails,"8.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+ testing_noteq(puFourCC,NULL,fails,"9.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+ if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) &&
+ (pHalInfo->dwSize != sizeof(DD_HALINFO_V4)))
+ {
+ printf("10. if this show for NT 2000/XP/2003 ignore it,
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\n");
+ fails++;
+ }
+
+ /* FIXME dump pHalInfo */
+ /* FIXME dump pCallBackFlags */
+ /* FIXME dump puD3dCallbacks */
+
+ /* testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
pCallBackFlags, NULL, .... */
+ printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData, NULL, ....)\n");
+
+ pHalInfo = &HalInfo;
+ pCallBackFlags = CallBackFlags;
+ puD3dCallbacks = &D3dCallbacks;
+ puD3dDriverData = &D3dDriverData;
+
+ RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
+ RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
+ RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));
+
+ retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+ pCallBackFlags, puD3dCallbacks,
+ puD3dDriverData, puD3dBufferCallbacks,
+ puD3dTextureFormats, puNumHeaps,
+ puvmList, puNumFourCC,
+ puFourCC);
+
+ testing_noteq(retValue,FALSE,fails,"1.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, NULL, ...);\0");
+ testing_eq(pHalInfo,NULL,fails,"2.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, NULL, ...);\0");
+ testing_eq(pCallBackFlags,NULL,fails,"3.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, NULL, ...);\0");
+ testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"4.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, NULL, ...);\0");
+
+
testing_noteq(puD3dDriverData->dwSize,sizeof(D3DNTHAL_GLOBALDRIVERDATA),fails,"5.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
NULL, ...);\0");
+
+ testing_noteq(puD3dBufferCallbacks,NULL,fails,"6.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, NULL, ...);\0");
+ testing_noteq(puD3dTextureFormats,NULL,fails,"7.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, NULL, ...);\0");
+ testing_noteq(puNumFourCC,NULL,fails,"8.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, NULL, ...);\0");
+ testing_noteq(puFourCC,NULL,fails,"9.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, NULL, ...);\0");
+ if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) &&
+ (pHalInfo->dwSize != sizeof(DD_HALINFO_V4)))
+ {
+ printf("10. if this show for NT 2000/XP/2003 ignore it,
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, NULL, ...);\n");
+ fails++;
+ }
+
+ /* FIXME dump pHalInfo */
+ /* FIXME dump pCallBackFlags */
+ /* FIXME dump puD3dCallbacks */
+ /* FIXME dump puD3dDriverData */
+
+
+
show_status(fails, "NtGdiDdQueryDirectDrawObject\0");