gdi32/tests: Add D3DKMTDestroyDevice tests.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2019-05-24 09:23:30 +01:00 committed by Alexandre Julliard
parent c7e4e45761
commit 13f649fde5
1 changed files with 21 additions and 0 deletions

View File

@ -228,6 +228,26 @@ static void test_D3DKMTCreateDevice(void)
ok(status == STATUS_SUCCESS, "Got unexpected return code %#x.\n", status);
}
static void test_D3DKMTDestroyDevice(void)
{
D3DKMT_DESTROYDEVICE destroy_device_desc;
NTSTATUS status;
if (!pD3DKMTDestroyDevice || pD3DKMTDestroyDevice(NULL) == STATUS_PROCEDURE_NOT_FOUND)
{
skip("D3DKMTDestroyDevice() is unavailable.\n");
return;
}
/* Invalid parameters */
status = pD3DKMTDestroyDevice(NULL);
todo_wine ok(status == STATUS_INVALID_PARAMETER, "Got unexpected return code %#x.\n", status);
memset(&destroy_device_desc, 0, sizeof(destroy_device_desc));
status = pD3DKMTDestroyDevice(&destroy_device_desc);
todo_wine ok(status == STATUS_INVALID_PARAMETER, "Got unexpected return code %#x.\n", status);
}
START_TEST(driver)
{
HMODULE gdi32 = GetModuleHandleA("gdi32.dll");
@ -242,4 +262,5 @@ START_TEST(driver)
test_D3DKMTOpenAdapterFromHdc();
test_D3DKMTCloseAdapter();
test_D3DKMTCreateDevice();
test_D3DKMTDestroyDevice();
}