From: Jeff Smith Subject: [PATCH 3/4] ddraw/tests: Print name of device as part of failure messages. Message-Id: <20200319205950.3046106-3-whydoubt@gmail.com> Date: Thu, 19 Mar 2020 15:59:49 -0500 In-Reply-To: <20200319205950.3046106-1-whydoubt@gmail.com> References: <20200319205950.3046106-1-whydoubt@gmail.com> Signed-off-by: Jeff Smith --- dlls/ddraw/tests/ddraw1.c | 28 ++++++++++++----------- dlls/ddraw/tests/ddraw2.c | 47 +++++++++++++++++++++------------------ dlls/ddraw/tests/ddraw4.c | 43 ++++++++++++++++++----------------- dlls/ddraw/tests/ddraw7.c | 43 ++++++++++++++++++----------------- 4 files changed, 86 insertions(+), 75 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 3495939d07..86aa68d218 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -3886,6 +3886,7 @@ static void test_unsupported_formats(void) static void test_rt_caps(void) { + const char *device_name = "HAL"; PALETTEENTRY palette_entries[256]; IDirectDrawPalette *palette; IDirect3DDevice *device; @@ -4059,7 +4060,7 @@ static void test_rt_caps(void) ok(!!ddraw, "Failed to create a ddraw object.\n"); if (!(device = create_device(ddraw, window, DDSCL_NORMAL))) { - skip("Failed to create a 3D device, skipping test.\n"); + skip("Failed to create a (%s) 3D device, skipping test.\n", device_name); IDirectDraw_Release(ddraw); DestroyWindow(window); return; @@ -4096,40 +4097,41 @@ static void test_rt_caps(void) surface_desc.dwHeight = 480; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL); ok(SUCCEEDED(hr) || broken(test_data[i].create_may_fail), - "Test %u: Failed to create surface with caps %#x, hr %#x.\n", - i, test_data[i].caps_in, hr); + "Test %s %u: Failed to create surface with caps %#x, hr %#x.\n", + device_name, i, test_data[i].caps_in, hr); if (FAILED(hr)) continue; memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to get surface desc, hr %#x.\n", device_name, i, hr); ok(test_data[i].caps_out == ~0U || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out, - "Test %u: Got unexpected caps %#x, expected %#x.\n", - i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out); + "Test %s %u: Got unexpected caps %#x, expected %#x.\n", + device_name, i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DHALDevice, (void **)&device); - ok(hr == test_data[i].create_device_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", - i, hr, test_data[i].create_device_hr); + ok(hr == test_data[i].create_device_hr, "Test %s %u: Got unexpected hr %#x, expected %#x.\n", + device_name, i, hr, test_data[i].create_device_hr); if (hr == DDERR_NOPALETTEATTACHED) { hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Test %u: Failed to set palette, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to set palette, hr %#x.\n", device_name, i, hr); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DHALDevice, (void **)&device); if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY) - ok(hr == DDERR_INVALIDPIXELFORMAT, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPIXELFORMAT, "Test %s %u: Got unexpected hr %#x.\n", device_name, i, hr); else - ok(hr == D3DERR_SURFACENOTINVIDMEM, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3DERR_SURFACENOTINVIDMEM, "Test %s %u: Got unexpected hr %#x.\n", device_name, i, hr); } if (SUCCEEDED(hr)) { refcount = IDirect3DDevice_Release(device); - ok(refcount == 1, "Test %u: Got unexpected refcount %u.\n", i, refcount); + ok(refcount == 1, "Test %s %u: Got unexpected refcount %u.\n", device_name, i, refcount); } refcount = IDirectDrawSurface_Release(surface); - ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %s %u: The surface was not properly freed, refcount %u.\n", + device_name, i, refcount); } IDirectDrawPalette_Release(palette); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index d18bf7da01..71f1413b14 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -4308,6 +4308,7 @@ static void test_unsupported_formats(void) static void test_rt_caps(void) { + const char *device_name = "HAL"; PALETTEENTRY palette_entries[256]; IDirectDrawPalette *palette; IDirect3DDevice2 *device; @@ -4524,7 +4525,7 @@ static void test_rt_caps(void) ok(!!ddraw, "Failed to create a ddraw object.\n"); if (!(device = create_device(ddraw, window, DDSCL_NORMAL))) { - skip("Failed to create a 3D device, skipping test.\n"); + skip("Failed to create a (%s) 3D device, skipping test.\n", device_name); IDirectDraw2_Release(ddraw); DestroyWindow(window); return; @@ -4567,33 +4568,33 @@ static void test_rt_caps(void) surface_desc.dwHeight = 480; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); ok(SUCCEEDED(hr) || broken(test_data[i].create_may_fail), - "Test %u: Failed to create surface with caps %#x, hr %#x.\n", - i, test_data[i].caps_in, hr); + "Test %s %u: Failed to create surface with caps %#x, hr %#x.\n", + device_name, i, test_data[i].caps_in, hr); if (FAILED(hr)) continue; memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to get surface desc, hr %#x.\n", device_name, i, hr); ok(test_data[i].caps_out == ~0U || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out, - "Test %u: Got unexpected caps %#x, expected %#x.\n", - i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out); + "Test %s %u: Got unexpected caps %#x, expected %#x.\n", + device_name, i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out); hr = IDirect3D2_CreateDevice(d3d, &IID_IDirect3DHALDevice, surface, &device); - ok(hr == test_data[i].create_device_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", - i, hr, test_data[i].create_device_hr); + ok(hr == test_data[i].create_device_hr, "Test %s %u: Got unexpected hr %#x, expected %#x.\n", + device_name, i, hr, test_data[i].create_device_hr); if (FAILED(hr)) { if (hr == DDERR_NOPALETTEATTACHED) { hr = IDirectDrawSurface_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Test %u: Failed to set palette, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to set palette, hr %#x.\n", device_name, i, hr); hr = IDirect3D2_CreateDevice(d3d, &IID_IDirect3DHALDevice, surface, &device); if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY) - ok(hr == DDERR_INVALIDPIXELFORMAT, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPIXELFORMAT, "Test %s %u: Got unexpected hr %#x.\n", device_name, i, hr); else - ok(hr == D3DERR_SURFACENOTINVIDMEM, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3DERR_SURFACENOTINVIDMEM, "Test %s %u: Got unexpected hr %#x.\n", device_name, i, hr); } IDirectDrawSurface_Release(surface); @@ -4604,10 +4605,10 @@ static void test_rt_caps(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create surface, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create surface, hr %#x.\n", device_name, i, hr); hr = IDirect3D2_CreateDevice(d3d, &IID_IDirect3DHALDevice, surface, &device); - ok(SUCCEEDED(hr), "Test %u: Failed to create device, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create device, hr %#x.\n", device_name, i, hr); } memset(&surface_desc, 0, sizeof(surface_desc)); @@ -4627,13 +4628,13 @@ static void test_rt_caps(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &rt, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create surface with caps %#x, hr %#x.\n", - i, test_data[i].caps_in, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create surface with caps %#x, hr %#x.\n", + device_name, i, test_data[i].caps_in, hr); hr = IDirect3DDevice2_SetRenderTarget(device, rt, 0); ok(hr == test_data[i].set_rt_hr || broken(hr == test_data[i].alternative_set_rt_hr), - "Test %u: Got unexpected hr %#x, expected %#x.\n", - i, hr, test_data[i].set_rt_hr); + "Test %s %u: Got unexpected hr %#x, expected %#x.\n", + device_name, i, hr, test_data[i].set_rt_hr); if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT) expected_rt = rt; else @@ -4644,19 +4645,21 @@ static void test_rt_caps(void) if (hr == DDERR_INVALIDPIXELFORMAT) { refcount = IDirectDrawSurface_AddRef(rt); - ok(refcount == 2, "Test %u: Got unexpected refcount %u.\n", i, refcount); + ok(refcount == 2, "Test %s %u: Got unexpected refcount %u.\n", device_name, i, refcount); } hr = IDirect3DDevice2_GetRenderTarget(device, &tmp); - ok(SUCCEEDED(hr), "Test %u: Failed to get render target, hr %#x.\n", i, hr); - ok(tmp == expected_rt, "Test %u: Got unexpected rt %p.\n", i, tmp); + ok(SUCCEEDED(hr), "Test %s %u: Failed to get render target, hr %#x.\n", device_name, i, hr); + ok(tmp == expected_rt, "Test %s %u: Got unexpected rt %p.\n", device_name, i, tmp); IDirectDrawSurface_Release(tmp); IDirectDrawSurface_Release(rt); refcount = IDirect3DDevice2_Release(device); - ok(refcount == 0, "Test %u: The device was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %s %u: The device was not properly freed, refcount %u.\n", + device_name, i, refcount); refcount = IDirectDrawSurface_Release(surface); - ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %s %u: The surface was not properly freed, refcount %u.\n", + device_name, i, refcount); } IDirectDrawPalette_Release(palette); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 825fc6ef3c..e3299ee643 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -5925,6 +5925,7 @@ static void test_unsupported_formats(void) static void test_rt_caps(void) { + const char *device_name = "HAL"; PALETTEENTRY palette_entries[256]; IDirectDrawPalette *palette; IDirectDraw4 *ddraw; @@ -6156,31 +6157,31 @@ static void test_rt_caps(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create surface with caps %#x, hr %#x.\n", - i, test_data[i].caps_in, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create surface with caps %#x, hr %#x.\n", + device_name, i, test_data[i].caps_in, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface4_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to get surface desc, hr %#x.\n", device_name, i, hr); ok(test_data[i].caps_out == ~0U || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out, - "Test %u: Got unexpected caps %#x, expected %#x.\n", - i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out); + "Test %s %u: Got unexpected caps %#x, expected %#x.\n", + device_name, i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out); hr = IDirect3D3_CreateDevice(d3d, &IID_IDirect3DHALDevice, surface, &device, NULL); - ok(hr == test_data[i].create_device_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", - i, hr, test_data[i].create_device_hr); + ok(hr == test_data[i].create_device_hr, "Test %s %u: Got unexpected hr %#x, expected %#x.\n", + device_name, i, hr, test_data[i].create_device_hr); if (FAILED(hr)) { if (hr == DDERR_NOPALETTEATTACHED) { hr = IDirectDrawSurface4_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Test %u: Failed to set palette, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to set palette, hr %#x.\n", device_name, i, hr); hr = IDirect3D3_CreateDevice(d3d, &IID_IDirect3DHALDevice, surface, &device, NULL); if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY) - ok(hr == DDERR_INVALIDPIXELFORMAT, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPIXELFORMAT, "Test %s %u: Got unexpected hr %#x.\n", device_name, i, hr); else - ok(hr == D3DERR_SURFACENOTINVIDMEM, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3DERR_SURFACENOTINVIDMEM, "Test %s %u: Got unexpected hr %#x.\n", device_name, i, hr); } IDirectDrawSurface4_Release(surface); @@ -6191,10 +6192,10 @@ static void test_rt_caps(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create surface, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create surface, hr %#x.\n", device_name, i, hr); hr = IDirect3D3_CreateDevice(d3d, &IID_IDirect3DHALDevice, surface, &device, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create device, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create device, hr %#x.\n", device_name, i, hr); } memset(&surface_desc, 0, sizeof(surface_desc)); @@ -6209,28 +6210,30 @@ static void test_rt_caps(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &rt, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create surface with caps %#x, hr %#x.\n", - i, test_data[i].caps_in, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create surface with caps %#x, hr %#x.\n", + device_name, i, test_data[i].caps_in, hr); hr = IDirect3DDevice3_SetRenderTarget(device, rt, 0); ok(hr == test_data[i].set_rt_hr || broken(hr == test_data[i].alternative_set_rt_hr), - "Test %u: Got unexpected hr %#x, expected %#x.\n", - i, hr, test_data[i].set_rt_hr); + "Test %s %u: Got unexpected hr %#x, expected %#x.\n", + device_name, i, hr, test_data[i].set_rt_hr); if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT) expected_rt = rt; else expected_rt = surface; hr = IDirect3DDevice3_GetRenderTarget(device, &tmp); - ok(SUCCEEDED(hr), "Test %u: Failed to get render target, hr %#x.\n", i, hr); - ok(tmp == expected_rt, "Test %u: Got unexpected rt %p.\n", i, tmp); + ok(SUCCEEDED(hr), "Test %s %u: Failed to get render target, hr %#x.\n", device_name, i, hr); + ok(tmp == expected_rt, "Test %s %u: Got unexpected rt %p.\n", device_name, i, tmp); IDirectDrawSurface4_Release(tmp); IDirectDrawSurface4_Release(rt); refcount = IDirect3DDevice3_Release(device); - ok(refcount == 0, "Test %u: The device was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %s %u: The device was not properly freed, refcount %u.\n", + device_name, i, refcount); refcount = IDirectDrawSurface4_Release(surface); - ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %s %u: The surface was not properly freed, refcount %u.\n", + device_name, i, refcount); } IDirectDrawPalette_Release(palette); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 1bfe6d2e08..2fcc54283f 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -5664,6 +5664,7 @@ static void test_unsupported_formats(void) static void test_rt_caps(void) { + const char *device_name = "HAL"; const GUID *devtype = &IID_IDirect3DHALDevice; PALETTEENTRY palette_entries[256]; IDirectDrawPalette *palette; @@ -5902,31 +5903,31 @@ static void test_rt_caps(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create surface with caps %#x, hr %#x.\n", - i, test_data[i].caps_in, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create surface with caps %#x, hr %#x.\n", + device_name, i, test_data[i].caps_in, hr); memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc); - ok(SUCCEEDED(hr), "Test %u: Failed to get surface desc, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to get surface desc, hr %#x.\n", device_name, i, hr); ok(test_data[i].caps_out == ~0U || surface_desc.ddsCaps.dwCaps == test_data[i].caps_out, - "Test %u: Got unexpected caps %#x, expected %#x.\n", - i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out); + "Test %s %u: Got unexpected caps %#x, expected %#x.\n", + device_name, i, surface_desc.ddsCaps.dwCaps, test_data[i].caps_out); hr = IDirect3D7_CreateDevice(d3d, devtype, surface, &device); - ok(hr == test_data[i].create_device_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n", - i, hr, test_data[i].create_device_hr); + ok(hr == test_data[i].create_device_hr, "Test %s %u: Got unexpected hr %#x, expected %#x.\n", + device_name, i, hr, test_data[i].create_device_hr); if (FAILED(hr)) { if (hr == DDERR_NOPALETTEATTACHED) { hr = IDirectDrawSurface7_SetPalette(surface, palette); - ok(SUCCEEDED(hr), "Test %u: Failed to set palette, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to set palette, hr %#x.\n", device_name, i, hr); hr = IDirect3D7_CreateDevice(d3d, devtype, surface, &device); if (surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY) - ok(hr == DDERR_INVALIDPIXELFORMAT, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == DDERR_INVALIDPIXELFORMAT, "Test %s %u: Got unexpected hr %#x.\n", device_name, i, hr); else - ok(hr == D3DERR_SURFACENOTINVIDMEM, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == D3DERR_SURFACENOTINVIDMEM, "Test %s %u: Got unexpected hr %#x.\n", device_name, i, hr); } IDirectDrawSurface7_Release(surface); @@ -5937,10 +5938,10 @@ static void test_rt_caps(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create surface, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create surface, hr %#x.\n", device_name, i, hr); hr = IDirect3D7_CreateDevice(d3d, devtype, surface, &device); - ok(SUCCEEDED(hr), "Test %u: Failed to create device, hr %#x.\n", i, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create device, hr %#x.\n", device_name, i, hr); } memset(&surface_desc, 0, sizeof(surface_desc)); @@ -5955,28 +5956,30 @@ static void test_rt_caps(void) surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &rt, NULL); - ok(SUCCEEDED(hr), "Test %u: Failed to create surface with caps %#x, hr %#x.\n", - i, test_data[i].caps_in, hr); + ok(SUCCEEDED(hr), "Test %s %u: Failed to create surface with caps %#x, hr %#x.\n", + device_name, i, test_data[i].caps_in, hr); hr = IDirect3DDevice7_SetRenderTarget(device, rt, 0); ok(hr == test_data[i].set_rt_hr || broken(hr == test_data[i].alternative_set_rt_hr), - "Test %u: Got unexpected hr %#x, expected %#x.\n", - i, hr, test_data[i].set_rt_hr); + "Test %s %u: Got unexpected hr %#x, expected %#x.\n", + device_name, i, hr, test_data[i].set_rt_hr); if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT) expected_rt = rt; else expected_rt = surface; hr = IDirect3DDevice7_GetRenderTarget(device, &tmp); - ok(SUCCEEDED(hr), "Test %u: Failed to get render target, hr %#x.\n", i, hr); - ok(tmp == expected_rt, "Test %u: Got unexpected rt %p.\n", i, tmp); + ok(SUCCEEDED(hr), "Test %s %u: Failed to get render target, hr %#x.\n", device_name, i, hr); + ok(tmp == expected_rt, "Test %s %u: Got unexpected rt %p.\n", device_name, i, tmp); IDirectDrawSurface7_Release(tmp); IDirectDrawSurface7_Release(rt); refcount = IDirect3DDevice7_Release(device); - ok(refcount == 0, "Test %u: The device was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %s %u: The device was not properly freed, refcount %u.\n", + device_name, i, refcount); refcount = IDirectDrawSurface7_Release(surface); - ok(refcount == 0, "Test %u: The surface was not properly freed, refcount %u.\n", i, refcount); + ok(refcount == 0, "Test %s %u: The surface was not properly freed, refcount %u.\n", + device_name, i, refcount); } IDirectDrawPalette_Release(palette); -- 2.23.0