=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: tests: Add test for Map() on reserved resources.

Alexandre Julliard julliard at winehq.org
Fri Jul 5 14:49:01 CDT 2019


Module: vkd3d
Branch: master
Commit: acd5417f8bb8570f35ad86ee8a77544d5e43e1b4
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=acd5417f8bb8570f35ad86ee8a77544d5e43e1b4

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Thu Jul  4 16:41:07 2019 +0200

tests: Add test for Map() on reserved resources.

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>

---

 tests/d3d12.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/d3d12.c b/tests/d3d12.c
index b8eb4ab..bd055fb 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -2186,6 +2186,7 @@ static void test_create_reserved_resource(void)
     ID3D12Device *device;
     ULONG refcount;
     HRESULT hr;
+    void *ptr;
 
     if (!(device = create_device()))
     {
@@ -2232,6 +2233,10 @@ static void test_create_reserved_resource(void)
     ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
     ok(heap_flags == 0xdeadbeef, "Got unexpected heap flags %#x.\n", heap_flags);
 
+    /* Map() is not allowed on reserved resources */
+    hr = ID3D12Resource_Map(resource, 0, NULL, &ptr);
+    ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
     refcount = ID3D12Resource_Release(resource);
     ok(!refcount, "ID3D12Resource has %u references left.\n", (unsigned int)refcount);
 




More information about the wine-cvs mailing list