mirror of
https://github.com/reactos/reactos.git
synced 2024-08-20 02:13:29 +00:00
update with more test for w32knapi
svn path=/trunk/; revision=28298
This commit is contained in:
parent
cc185a5b73
commit
b694e14566
|
@ -200,11 +200,13 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
|
||||||
|
|
||||||
/* FIXME DD_HALINFO_V4 test */
|
/* FIXME DD_HALINFO_V4 test */
|
||||||
|
|
||||||
|
/* Next Start 2 */
|
||||||
RtlCopyMemory(&oldHalInfo, &HalInfo, sizeof(DD_HALINFO));
|
RtlCopyMemory(&oldHalInfo, &HalInfo, sizeof(DD_HALINFO));
|
||||||
|
|
||||||
pHalInfo = &HalInfo;
|
pHalInfo = &HalInfo;
|
||||||
pCallBackFlags = CallBackFlags;
|
pCallBackFlags = CallBackFlags;
|
||||||
RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
|
RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
|
||||||
|
|
||||||
RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,
|
RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,
|
||||||
pCallBackFlags, puD3dCallbacks,
|
pCallBackFlags, puD3dCallbacks,
|
||||||
puD3dDriverData, puD3dBufferCallbacks,
|
puD3dDriverData, puD3dBufferCallbacks,
|
||||||
|
@ -223,8 +225,180 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
|
||||||
|
|
||||||
/* We do not retesting DD_HALINFO, instead we compare it */
|
/* We do not retesting DD_HALINFO, instead we compare it */
|
||||||
RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0);
|
RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0);
|
||||||
|
RTEST(pCallBackFlags[0] != 0);
|
||||||
|
RTEST(pCallBackFlags[1] != 0);
|
||||||
|
|
||||||
|
/* NT4 this will fail */
|
||||||
|
RTEST(pCallBackFlags[2] == 0);
|
||||||
|
|
||||||
|
/* Next Start 3 */
|
||||||
|
pHalInfo = &HalInfo;
|
||||||
|
pCallBackFlags = CallBackFlags;
|
||||||
|
puD3dCallbacks = &D3dCallbacks;
|
||||||
|
|
||||||
|
RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
|
||||||
|
RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
|
||||||
|
|
||||||
|
RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,
|
||||||
|
pCallBackFlags, puD3dCallbacks,
|
||||||
|
puD3dDriverData, puD3dBufferCallbacks,
|
||||||
|
puD3dTextureFormats, puNumHeaps,
|
||||||
|
puvmList, puNumFourCC,
|
||||||
|
puFourCC)== FALSE);
|
||||||
|
RTEST(pHalInfo != NULL);
|
||||||
|
RTEST(pCallBackFlags != NULL);
|
||||||
|
|
||||||
|
if (pHalInfo->ddCaps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE )
|
||||||
|
{
|
||||||
|
RTEST(puD3dCallbacks != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
RTEST(puD3dDriverData == NULL);
|
||||||
|
RTEST(puD3dBufferCallbacks == NULL);
|
||||||
|
RTEST(puD3dTextureFormats == NULL);
|
||||||
|
RTEST(puNumFourCC == NULL);
|
||||||
|
RTEST(puFourCC == NULL);
|
||||||
|
ASSERT1(pHalInfo != NULL);
|
||||||
|
|
||||||
|
/* We do not retesting DD_HALINFO, instead we compare it */
|
||||||
|
RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0);
|
||||||
|
RTEST(pCallBackFlags[0] != 0);
|
||||||
|
RTEST(pCallBackFlags[1] != 0);
|
||||||
|
|
||||||
|
/* NT4 this will fail */
|
||||||
|
RTEST(pCallBackFlags[2] == 0);
|
||||||
|
|
||||||
|
/* Next Start 4 */
|
||||||
|
pHalInfo = &HalInfo;
|
||||||
|
pCallBackFlags = CallBackFlags;
|
||||||
|
puD3dCallbacks = &D3dCallbacks;
|
||||||
|
puD3dDriverData = &D3dDriverData;
|
||||||
|
|
||||||
|
RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
|
||||||
|
RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
|
||||||
|
RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));
|
||||||
|
|
||||||
|
RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,
|
||||||
|
pCallBackFlags, puD3dCallbacks,
|
||||||
|
puD3dDriverData, puD3dBufferCallbacks,
|
||||||
|
puD3dTextureFormats, puNumHeaps,
|
||||||
|
puvmList, puNumFourCC,
|
||||||
|
puFourCC)== FALSE);
|
||||||
|
RTEST(pHalInfo != NULL);
|
||||||
|
RTEST(pCallBackFlags != NULL);
|
||||||
|
|
||||||
|
if (pHalInfo->ddCaps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE )
|
||||||
|
{
|
||||||
|
RTEST(puD3dCallbacks != NULL);
|
||||||
|
RTEST(puD3dDriverData != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
RTEST(puD3dBufferCallbacks == NULL);
|
||||||
|
RTEST(puD3dTextureFormats == NULL);
|
||||||
|
RTEST(puNumFourCC == NULL);
|
||||||
|
RTEST(puFourCC == NULL);
|
||||||
|
ASSERT1(pHalInfo != NULL);
|
||||||
|
|
||||||
|
/* We do not retesting DD_HALINFO, instead we compare it */
|
||||||
|
RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0);
|
||||||
|
RTEST(pCallBackFlags[0] != 0);
|
||||||
|
RTEST(pCallBackFlags[1] != 0);
|
||||||
|
|
||||||
|
/* NT4 this will fail */
|
||||||
|
RTEST(pCallBackFlags[2] == 0);
|
||||||
|
|
||||||
|
/* Next Start 5 */
|
||||||
|
pHalInfo = &HalInfo;
|
||||||
|
pCallBackFlags = CallBackFlags;
|
||||||
|
puD3dCallbacks = &D3dCallbacks;
|
||||||
|
puD3dDriverData = &D3dDriverData;
|
||||||
|
puD3dBufferCallbacks = &D3dBufferCallbacks;
|
||||||
|
|
||||||
|
RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
|
||||||
|
RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
|
||||||
|
RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));
|
||||||
|
RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_CALLBACKS));
|
||||||
|
|
||||||
|
RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,
|
||||||
|
pCallBackFlags, puD3dCallbacks,
|
||||||
|
puD3dDriverData, puD3dBufferCallbacks,
|
||||||
|
puD3dTextureFormats, puNumHeaps,
|
||||||
|
puvmList, puNumFourCC,
|
||||||
|
puFourCC)== FALSE);
|
||||||
|
RTEST(pHalInfo != NULL);
|
||||||
|
RTEST(pCallBackFlags != NULL);
|
||||||
|
|
||||||
|
if (pHalInfo->ddCaps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE )
|
||||||
|
{
|
||||||
|
RTEST(puD3dCallbacks != NULL);
|
||||||
|
RTEST(puD3dDriverData != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
RTEST(puD3dBufferCallbacks == NULL);
|
||||||
|
RTEST(puD3dTextureFormats == NULL);
|
||||||
|
RTEST(puNumFourCC == NULL);
|
||||||
|
RTEST(puFourCC == NULL);
|
||||||
|
ASSERT1(pHalInfo != NULL);
|
||||||
|
|
||||||
|
/* We do not retesting DD_HALINFO, instead we compare it */
|
||||||
|
RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0);
|
||||||
|
RTEST(pCallBackFlags[0] != 0);
|
||||||
|
RTEST(pCallBackFlags[1] != 0);
|
||||||
|
|
||||||
|
/* NT4 this will fail */
|
||||||
|
RTEST(pCallBackFlags[2] == 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Next Start 6 */
|
||||||
|
//pHalInfo = &HalInfo;
|
||||||
|
//pCallBackFlags = CallBackFlags;
|
||||||
|
//puD3dCallbacks = &D3dCallbacks;
|
||||||
|
//puD3dDriverData = &D3dDriverData;
|
||||||
|
//puD3dBufferCallbacks = &D3dBufferCallbacks;
|
||||||
|
|
||||||
|
//RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
|
||||||
|
//RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
|
||||||
|
//RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));
|
||||||
|
////RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_CALLBACKS));
|
||||||
|
//RtlZeroMemory(&D3dBufferCallbacks,sizeof(D3DNTHAL_CALLBACKS));
|
||||||
|
|
||||||
|
//RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,
|
||||||
|
// pCallBackFlags, puD3dCallbacks,
|
||||||
|
// puD3dDriverData, puD3dBufferCallbacks,
|
||||||
|
// puD3dTextureFormats, puNumHeaps,
|
||||||
|
// puvmList, puNumFourCC,
|
||||||
|
// puFourCC)== FALSE);
|
||||||
|
//RTEST(pHalInfo != NULL);
|
||||||
|
//RTEST(pCallBackFlags != NULL);
|
||||||
|
|
||||||
|
//if (pHalInfo->ddCaps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE )
|
||||||
|
//{
|
||||||
|
// RTEST(puD3dCallbacks != NULL);
|
||||||
|
// RTEST(puD3dDriverData != NULL);
|
||||||
|
// RTEST(puD3dBufferCallbacks != NULL);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//RTEST(puD3dTextureFormats == NULL);
|
||||||
|
//RTEST(puNumFourCC == NULL);
|
||||||
|
//RTEST(puFourCC == NULL);
|
||||||
|
//ASSERT1(pHalInfo != NULL);
|
||||||
|
|
||||||
|
///* We do not retesting DD_HALINFO, instead we compare it */
|
||||||
|
//RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0);
|
||||||
|
//RTEST(pCallBackFlags[0] != 0);
|
||||||
|
//RTEST(pCallBackFlags[1] != 0);
|
||||||
|
|
||||||
|
///* NT4 this will fail */
|
||||||
|
//RTEST(pCallBackFlags[2] == 0);
|
||||||
|
|
||||||
|
|
||||||
|
/* FIXME
|
||||||
|
RTEST(puD3dTextureFormats == NULL);
|
||||||
|
RTEST(puNumFourCC == NULL);
|
||||||
|
RTEST(puFourCC == NULL);
|
||||||
|
*/
|
||||||
/* Cleanup ReactX setup */
|
/* Cleanup ReactX setup */
|
||||||
DeleteDC(hdc);
|
DeleteDC(hdc);
|
||||||
Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw);
|
Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw);
|
||||||
|
|
Loading…
Reference in a new issue