Commit 95b822d6 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3dx9/tests: Improve test failure messages for check_dds_pixel_format.

parent 217c8b94
......@@ -211,7 +211,10 @@ static void fill_dds_header(struct dds_header *header)
header->caps = DDS_CAPS_TEXTURE;
}
static void check_dds_pixel_format(DWORD flags, DWORD fourcc, DWORD bpp,
#define check_dds_pixel_format(flags, fourcc, bpp, rmask, gmask, bmask, amask, format) \
check_dds_pixel_format_(__LINE__, flags, fourcc, bpp, rmask, gmask, bmask, amask, format)
static void check_dds_pixel_format_(unsigned int line,
DWORD flags, DWORD fourcc, DWORD bpp,
DWORD rmask, DWORD gmask, DWORD bmask, DWORD amask,
D3DFORMAT expected_format)
{
......@@ -234,9 +237,13 @@ static void check_dds_pixel_format(DWORD flags, DWORD fourcc, DWORD bpp,
memset(dds.data, 0, sizeof(dds.data));
hr = D3DXGetImageInfoFromFileInMemory(&dds, sizeof(dds), &info);
ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x for pixel format %#x, expected %#x\n", hr, expected_format, D3D_OK);
ok_(__FILE__, line)(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x for pixel format %#x, expected %#x\n",
hr, expected_format, D3D_OK);
if (SUCCEEDED(hr))
ok(info.Format == expected_format, "D3DXGetImageInfoFromFileInMemory returned format %#x, expected %#x\n", info.Format, expected_format);
{
ok_(__FILE__, line)(info.Format == expected_format, "D3DXGetImageInfoFromFileInMemory returned format %#x, expected %#x\n",
info.Format, expected_format);
}
}
static void test_dds_header_handling(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment