[PATCH 1/2] d3dx9_36/tests: Add D3DXSaveSurfaceToFileInMemory D3DXIFF_DDS tests (try 2)

Henri Verbeet hverbeet at gmail.com
Tue Dec 8 05:22:47 CST 2015


On 7 December 2015 at 07:53, Alistair Leslie-Hughes
<leslie_alistair at hotmail.com> wrote:
> +    SetRect(&rect, 0, 0, 0, 0);
It's not a bit deal, but "SetRectEmpty(&rect);".

> +    hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_DDS, surface, NULL, &rect);
> +    todo_wine ok(hr == D3D_OK, "D3DXSaveSurfaceToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK);
Just write something like "Got unexpected hr %#x.\n". You can easily
tell what the expected value is by looking at the test.

> +        ok(header->size == 124, "Invalid DDS size %d.\n", header->size);
> +        ok(!header->height, "Wrong height %d.\n", header->height);
> +        ok(!header->width, "Wrong width %d.\n", header->width);
> +        ok(!header->depth, "Wrong depth %d.\n", header->depth);
> +        ok(!header->miplevels, "Wrong miplevels %d.\n", header->miplevels);
These are all unsigned values, so use %u. Note that if a test returns
something you didn't expect that's not necessarily wrong or invalid,
just unexpected.



More information about the wine-devel mailing list