=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d9/tests: Add test for invalid query types.
Alexandre Julliard
julliard at winehq.org
Tue May 23 18:01:27 CDT 2017
Module: wine
Branch: master
Commit: 42951f3e1014a3a165c3abffd55a1885ad3679f4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=42951f3e1014a3a165c3abffd55a1885ad3679f4
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Tue May 23 13:11:44 2017 +0200
d3d9/tests: Add test for invalid query types.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d9/tests/device.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 8ace42f..89ea772 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -5539,6 +5539,20 @@ static void test_query_support(void)
}
}
+ for (i = 0; i < 40; ++i)
+ {
+ if (D3DQUERYTYPE_VCACHE <= i && i <= D3DQUERYTYPE_MEMORYPRESSURE)
+ continue;
+
+ hr = IDirect3DDevice9_CreateQuery(device, i, NULL);
+ ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x for query %#x.\n", hr, i);
+
+ query = (IDirect3DQuery9 *)0xdeadbeef;
+ hr = IDirect3DDevice9_CreateQuery(device, i, &query);
+ ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x for query %#x.\n", hr, i);
+ ok(query == (IDirect3DQuery9 *)0xdeadbeef, "Got unexpected query %p.\n", query);
+ }
+
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
IDirect3D9_Release(d3d9);
More information about the wine-cvs
mailing list