Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/gdi32/tests/driver.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/dlls/gdi32/tests/driver.c b/dlls/gdi32/tests/driver.c index 6f5d728e15..b51d7dbb04 100644 --- a/dlls/gdi32/tests/driver.c +++ b/dlls/gdi32/tests/driver.c @@ -161,6 +161,26 @@ static void test_D3DKMTOpenAdapterFromHdc(void) } }
+static void test_D3DKMTCloseAdapter(void) +{ + D3DKMT_CLOSEADAPTER close_adapter_desc; + NTSTATUS status; + + if (!pD3DKMTCloseAdapter || pD3DKMTCloseAdapter(NULL) == STATUS_PROCEDURE_NOT_FOUND) + { + win_skip("D3DKMTCloseAdapter() is unavailable.\n"); + return; + } + + /* Invalid parameters */ + status = pD3DKMTCloseAdapter(NULL); + todo_wine ok(status == STATUS_INVALID_PARAMETER, "Got unexpected return code %#x.\n", status); + + memset(&close_adapter_desc, 0, sizeof(close_adapter_desc)); + status = pD3DKMTCloseAdapter(&close_adapter_desc); + todo_wine ok(status == STATUS_INVALID_PARAMETER, "Got unexpected return code %#x.\n", status); +} + START_TEST(driver) { HMODULE gdi32 = LoadLibraryA("gdi32.dll"); @@ -169,6 +189,7 @@ START_TEST(driver) pD3DKMTOpenAdapterFromGdiDisplayName = (void *)GetProcAddress(gdi32, "D3DKMTOpenAdapterFromGdiDisplayName"); pD3DKMTOpenAdapterFromHdc = (void *)GetProcAddress(gdi32, "D3DKMTOpenAdapterFromHdc");
+ test_D3DKMTCloseAdapter(); test_D3DKMTOpenAdapterFromGdiDisplayName(); test_D3DKMTOpenAdapterFromHdc();