[v2 PATCH 2/2] d3d10/test: Test for ID3D10InfoQueue interface

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue May 31 04:33:59 CDT 2016


Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/d3d10_1/tests/d3d10_1.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
index f5b1454..f70b4ff 100644
--- a/dlls/d3d10_1/tests/d3d10_1.c
+++ b/dlls/d3d10_1/tests/d3d10_1.c
@@ -297,6 +297,9 @@ static void test_device_interfaces(void)
                 "Device should implement ID3D10Multithread interface, hr %#x.\n", hr);
         if (SUCCEEDED(hr)) IUnknown_Release(iface);
 
+        hr = ID3D10Device1_QueryInterface(device, &IID_ID3D10InfoQueue, (void **)&iface);
+        ok(hr == E_NOINTERFACE, "Found ID3D10InfoQueue interface in non-debug mode, hr %#x.\n", hr);
+
         hr = ID3D10Device1_QueryInterface(device, &IID_ID3D10Device, (void **)&iface);
         ok(SUCCEEDED(hr), "Device should implement ID3D10Device interface, hr %#x.\n", hr);
         IUnknown_Release(iface);
@@ -309,6 +312,26 @@ static void test_device_interfaces(void)
         refcount = ID3D10Device1_Release(device);
         ok(!refcount, "Device has %u references left.\n", refcount);
     }
+
+    for (i = 0; i < sizeof(d3d10_feature_levels) / sizeof(*d3d10_feature_levels); ++i)
+    {
+        struct device_desc device_desc;
+
+        device_desc.feature_level = d3d10_feature_levels[i];
+        device_desc.flags = D3D10_CREATE_DEVICE_DEBUG;
+        if (!(device = create_device(&device_desc)))
+        {
+            skip("Failed to create device for feature level %#x.\n", d3d10_feature_levels[i]);
+            continue;
+        }
+
+        hr = ID3D10Device1_QueryInterface(device, &IID_ID3D10InfoQueue, (void **)&iface);
+        todo_wine ok(hr == S_OK, "Device should implement ID3D10InfoQueue interface, hr %#x.\n", hr);
+        if (SUCCEEDED(hr)) IUnknown_Release(iface);
+
+        refcount = ID3D10Device1_Release(device);
+        ok(!refcount, "Device has %u references left.\n", refcount);
+    }
 }
 
 static void test_create_shader_resource_view(void)
-- 
1.9.1




More information about the wine-patches mailing list