[PATCH] d2d1/tests: Some tests for GetRect() and GetRoundedRect()

Henri Verbeet hverbeet at gmail.com
Tue Nov 8 09:56:20 CST 2016


On 8 November 2016 at 15:05, Nikolay Sivov <nsivov at codeweavers.com> wrote:
> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
> ---
>  dlls/d2d1/tests/d2d1.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 88 insertions(+), 1 deletion(-)
>
This could probably be split into two patches, although I don't feel
too strongly about it.

> +    set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
> +    hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
> +    ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
> +    ID2D1RectangleGeometry_GetRect(geometry, &rect2);
> +    ok(!memcmp(&rect, &rect2, sizeof(rect)), "Got wrong rectangle.\n");
We tend to go with "unexpected" instead of "wrong", although that's
just fwiw. I do think it would be helpful to print the contents of
"rect2" here when the test fails.



More information about the wine-devel mailing list