mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
adding real testcase to GetDeviceIdentifier, we can not test everything, I leave small code comment out for easy debuging
svn path=/trunk/; revision=27100
This commit is contained in:
parent
62c5149fce
commit
048061505b
2 changed files with 32 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
<library>kernel32</library>
|
||||
<library>user32</library>
|
||||
<library>gdi32</library>
|
||||
<library>ole32</library>
|
||||
<library>ddraw</library>
|
||||
<library>dxguid</library>
|
||||
<file>ddraw_test.cpp</file>
|
||||
|
|
|
@ -378,6 +378,10 @@ BOOL Test_GetFourCCCodes (INT* passed, INT* failed)
|
|||
BOOL Test_GetDeviceIdentifier (INT* passed, INT* failed)
|
||||
{
|
||||
LPDIRECTDRAW7 DirectDraw;
|
||||
DDDEVICEIDENTIFIER2 pDDDI;
|
||||
//OLECHAR GuidStr[100];
|
||||
|
||||
|
||||
|
||||
/* Preparations */
|
||||
if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK)
|
||||
|
@ -386,6 +390,33 @@ BOOL Test_GetDeviceIdentifier (INT* passed, INT* failed)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
TEST ( DirectDraw->GetDeviceIdentifier(NULL, 0) == DDERR_INVALIDPARAMS );
|
||||
TEST ( DirectDraw->GetDeviceIdentifier(NULL, ~DDGDI_GETHOSTIDENTIFIER) == DDERR_INVALIDPARAMS );
|
||||
TEST ( DirectDraw->GetDeviceIdentifier(NULL, DDGDI_GETHOSTIDENTIFIER) == DDERR_INVALIDPARAMS );
|
||||
|
||||
|
||||
memset(&pDDDI,0,sizeof(DDDEVICEIDENTIFIER2));
|
||||
TEST ( DirectDraw->GetDeviceIdentifier(&pDDDI, 0) == DD_OK );
|
||||
|
||||
/*
|
||||
StringFromGUID2(pDDDI.guidDeviceIdentifier, GuidStr, 100);
|
||||
printf("1. \n");
|
||||
printf("szDriver : %s\n",pDDDI.szDriver);
|
||||
printf("szDescription : %s\n",pDDDI.szDescription);
|
||||
printf("liDriverVersion : 0x%08x . 0x%08x\n", pDDDI.liDriverVersion.HighPart, pDDDI.liDriverVersion.LowPart);
|
||||
printf("dwVendorId : 0x%08x\n",pDDDI.dwVendorId);
|
||||
printf("dwDeviceId : 0x%08x\n",pDDDI.dwDeviceId);
|
||||
printf("dwSubSysId : 0x%08x\n",pDDDI.dwSubSysId);
|
||||
printf("dwRevision : 0x%08x\n",pDDDI.dwRevision);
|
||||
printf("guidDeviceIdentifier : %ls\n",GuidStr);
|
||||
printf("dwWHQLLevel : 0x%08x\n",pDDDI.dwWHQLLevel);
|
||||
*/
|
||||
|
||||
memset(&pDDDI,0,sizeof(DDDEVICEIDENTIFIER2));
|
||||
TEST ( DirectDraw->GetDeviceIdentifier(&pDDDI, DDGDI_GETHOSTIDENTIFIER) == DD_OK );
|
||||
memset(&pDDDI,0,sizeof(DDDEVICEIDENTIFIER2));
|
||||
TEST ( DirectDraw->GetDeviceIdentifier(&pDDDI, ~DDGDI_GETHOSTIDENTIFIER) == DDERR_INVALIDPARAMS );
|
||||
|
||||
DirectDraw->Release();
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue