[PATCH] gdiplus: Add stub for GdipGraphicsSetAbort

Dmitry Timoshkov dmitry at baikal.ru
Thu Jul 27 00:01:51 CDT 2017


Andrew Eikum <aeikum at codeweavers.com> wrote:

> +static void test_GdipGraphicsSetAbort(void)
> +{
> +    HDC hdc = GetDC(hwnd);
> +    GpStatus status;
> +    GpGraphics *graphics;
> +
> +    if (!pGdipGraphicsSetAbort)
> +    {
> +        win_skip("GdipGraphicsSetAbort() is not supported.\n");
> +        return;

hdc is leaked.

> +    }
> +
> +    status = GdipCreateFromHDC(hdc, &graphics);
> +    expect(Ok, status);
> +
> +    status = pGdipGraphicsSetAbort(NULL, NULL);
> +    expect(InvalidParameter, status);
> +
> +    status = pGdipGraphicsSetAbort(graphics, NULL);
> +    expect(Ok, status);
> +
> +    ReleaseDC(hwnd, hdc);
> +}

graphics is leaked.

Also, it would be useful to test not invalid input as well.

-- 
Dmitry.



More information about the wine-devel mailing list