[Gdiplus try4 1/6] Implement GdipCreateRegion and mark the tests todo_wine instead of skipping over them all.

Alexandre Julliard julliard at winehq.org
Thu Jul 24 06:12:26 CDT 2008


Adam Petaccia <adam at tpetaccia.com> writes:

> diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c
> index 6b1c5f0..ef5ab28 100644
> --- a/dlls/gdiplus/tests/region.c
> +++ b/dlls/gdiplus/tests/region.c
> @@ -62,50 +62,60 @@ static void test_getregiondata(void)
>      GpRect rect;
>      GpPath *path;
>  
> +    ZeroMemory(buf, sizeof(buf));
> +
>      status = GdipCreateRegion(&region);
> -todo_wine
>      ok(status == Ok, "status %08x\n", status);
>  
> -    if(status != Ok) return;
> -
> +todo_wine
> +{
>      status = GdipGetRegionDataSize(region, &needed);
>      ok(status == Ok, "status %08x\n", status);
> -    ok(needed == 20, "got %d\n", needed);
> +    expect(20, needed);
>      status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed);
>      ok(status == Ok, "status %08x\n", status);
> -    ok(needed == 20, "got %d\n", needed);
> +    expect(20, needed);
>      expect_dword(buf, 12);
>      trace("buf[1] = %08x\n", buf[1]);
>      expect_magic((DWORD*)(buf + 2));
> +}
>      expect_dword(buf + 3, 0);
> +todo_wine
> +{

If you want to test that the buffer contains zero you should initialize
it with something else, this will avoid having the test succeed even
though Wine doesn't yet put anything in the buffer.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list