[PATCH] d2d1/tests: Add some tests for context target handling.

Nikolay Sivov nsivov at codeweavers.com
Wed Aug 22 08:24:42 CDT 2018


On 08/22/2018 04:10 PM, Henri Verbeet wrote:

> On 22 August 2018 at 14:59, Nikolay Sivov <nsivov at codeweavers.com> wrote:
>> +    hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
>> +    ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
>> +    ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
>> +    hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
>> +    ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
> Unless the error code isn't stable (in which case, please add a
> comment to that effect), it probably wouldn't hurt to be more specific
> about the expected error code.
Don't know about stability across version, but it's different for 
different target types. I've seen E_FAIL and D2DERR_INVALID_CALL.

It's not obvious to me that we'll want to match that, but I'll add 
explicit checks with next patches.



More information about the wine-devel mailing list