gdiplus: Add test cases for GdipDrawCurve

Andrew Eikum andrew at brightnightgames.com
Tue Jun 2 23:07:03 CDT 2009


Vincent Povirk wrote:
> +    /* make a graphics object and pen object */
>
> +    status = GdipCreateFromHDC(hdc, &graphics);
>
> +    expect(Ok, status);
>
> +    ok(hdc != NULL, "Expected HDC to be initialized\n");
>
> +
>
> +    status = GdipCreateFromHDC(hdc, &graphics);
>
> +    expect(Ok, status);
>
> +    ok(graphics != NULL, "Expected graphics to be initialized\n");
>
>
> You're creating two graphics objects here and leaking the first one.
>
> Vincent Povirk
>
>
>
> On Tue, Jun 2, 2009 at 10:39 PM, Andrew
> Eikum<andrew at brightnightgames.com> wrote:
>   
>> Tested on WinXP Professional SP3 and Win7 Ultimate RC1, all pass.
>>
>> ---
>>  dlls/gdiplus/tests/graphics.c |   64 +++++++++++++++++++++++++++++++++++++++++
>>  1 files changed, 64 insertions(+), 0 deletions(-)
>>
>>
>>
>>
>>     
You're right.  I copied that code from the test_GdipDrawBezierI test, 
which has the same problem.  Would removing the first two non-comment 
lines of the quoted section resolve the problem?

Also, how should one handle critical errors in tests?  For example, if 
hdc is null, the rest of the test cannot continue.  Should this be 
detected and exit early?  Or just let the test crash?

Thanks for pointing this out,
Andrew



More information about the wine-devel mailing list