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

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-07-04 16:41:07 +02:00 committed by Alexandre Julliard
parent c648ea85aa
commit acd5417f8b

View File

@ -2186,6 +2186,7 @@ static void test_create_reserved_resource(void)
ID3D12Device *device; ID3D12Device *device;
ULONG refcount; ULONG refcount;
HRESULT hr; HRESULT hr;
void *ptr;
if (!(device = create_device())) 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(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
ok(heap_flags == 0xdeadbeef, "Got unexpected heap flags %#x.\n", heap_flags); 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); refcount = ID3D12Resource_Release(resource);
ok(!refcount, "ID3D12Resource has %u references left.\n", (unsigned int)refcount); ok(!refcount, "ID3D12Resource has %u references left.\n", (unsigned int)refcount);