headers, two tests

Dmitry Timoshkov dmitry at codeweavers.com
Wed May 30 21:39:26 CDT 2007

This time it's just the nit picks, I see no serious problems.

"Evan Stade" <estade at gmail.com> wrote:

> +void WINGDIPAPI GdipFree(void* ptr)
> +{
> +    if(ptr)
> +        HeapFree(GetProcessHeap(), 0, ptr);
> +}

There is no need to check a pointer for NULL before HeapFree call, there is
even a janitorial project in Wine to remove such checks.

> +static void test_constructor_destructor(void)
> +{
> +    GpStatus status;
> +    GpGraphics *pen;
> +
> +    status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen);

GdipCreatePen1 takes a pointer to GpPen in the last parameter, not GpGraphics.

> +    expect(Ok, status);
> +    ok(pen, "Expected pen to be initialized");

If you are testing returned pen pointer for NULL, you need to initialize it
to NULL before the call.


More information about the wine-devel mailing list