Alistair Leslie-Hughes : d3d10_1/tests: Test for ID3D10InfoQueue interface.

Alexandre Julliard julliard at winehq.org
Fri Jun 3 10:03:46 CDT 2016


Module: wine
Branch: master
Commit: d94a2c9bb82684997af6a85af645acb8c50874ff
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d94a2c9bb82684997af6a85af645acb8c50874ff

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri Jun  3 15:26:40 2016 +0200

d3d10_1/tests: Test for ID3D10InfoQueue interface.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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)




More information about the wine-cvs mailing list