dinput/tests: Add tests for IDirectInput::GetDeviceStatus.

This commit is contained in:
Andrew Nguyen 2011-07-05 07:19:12 -05:00 committed by Alexandre Julliard
parent 9b1060d090
commit e5f73425dd
1 changed files with 27 additions and 0 deletions

View File

@ -245,6 +245,32 @@ static void test_EnumDevices(void)
IDirectInput_Release(pDI);
}
static void test_GetDeviceStatus(void)
{
IDirectInputA *pDI;
HRESULT hr;
hr = DirectInputCreateA(hInstance, DIRECTINPUT_VERSION, &pDI, NULL);
if (FAILED(hr))
{
win_skip("Failed to instantiate a IDirectInputA instance: 0x%08x\n", hr);
return;
}
hr = IDirectInput_GetDeviceStatus(pDI, NULL);
todo_wine
ok(hr == E_POINTER, "IDirectInput_GetDeviceStatus returned 0x%08x\n", hr);
hr = IDirectInput_GetDeviceStatus(pDI, &GUID_Unknown);
todo_wine
ok(hr == DIERR_DEVICENOTREG, "IDirectInput_GetDeviceStatus returned 0x%08x\n", hr);
hr = IDirectInput_GetDeviceStatus(pDI, &GUID_SysMouse);
ok(hr == DI_OK, "IDirectInput_GetDeviceStatus returned 0x%08x\n", hr);
IDirectInput_Release(pDI);
}
static void test_Initialize(void)
{
IDirectInputA *pDI;
@ -329,6 +355,7 @@ START_TEST(dinput)
test_QueryInterface();
test_CreateDevice();
test_EnumDevices();
test_GetDeviceStatus();
test_Initialize();
test_RunControlPanel();
CoUninitialize();