From 28c35689d2d9193cbf7ce5f523fecbaf377ae273 Mon Sep 17 00:00:00 2001 From: Esme Povirk Date: Tue, 23 Nov 2021 13:24:47 -0600 Subject: [PATCH] gdiplus: Mark a Windows behavior as broken. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51989 Signed-off-by: Esme Povirk Signed-off-by: Alexandre Julliard --- dlls/gdiplus/tests/graphics.c | 4 ++-- dlls/gdiplus/tests/graphicspath.c | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 572aa88cb79..d0454edb4a4 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -4140,7 +4140,7 @@ static void test_pen_thickness(void) size = max-min+1; - ok(size == td[i].cx, "%u: expected %d, got %d\n", i, td[i].cx, size); + ok(size == td[i].cx || broken (i == 1 && size == 1), "%u: expected %d, got %d\n", i, td[i].cx, size); min = -1; max = -2; @@ -4165,7 +4165,7 @@ static void test_pen_thickness(void) size = max-min+1; - ok(size == td[i].cy, "%u: expected %d, got %d\n", i, td[i].cy, size); + ok(size == td[i].cy || broken (i == 1 && size == 1), "%u: expected %d, got %d\n", i, td[i].cy, size); status = GdipBitmapUnlockBits(u.bitmap, &bd); expect(Ok, status); diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index a987cd165dc..07e6dd166ad 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1447,7 +1447,7 @@ static void test_widen(void) status = GdipGetPointCount(path, &count); expect(Ok, status); - expect(0, count); + ok(count == 0 || broken(count == 4), "expected 0, got %i\n", count); /* pen width = 0 pixels, UnitWorld - result is a path 1 unit wide */ GdipDeletePen(pen); @@ -1711,6 +1711,21 @@ static void test_widen_cap(void) status = GdipWidenPath(path, pen, NULL, FlatnessDefault); expect(Ok, status); + + if (i == 9) + { + INT size; + status = GdipGetPointCount(path, &size); + expect(Ok, status); + ok(size == caps[i].expected_size || broken(size == 12), "unexpected path size %i\n", size); + + if (size == 12) + { + GdipDeletePen(pen); + continue; + } + } + ok_path_fudge(path, caps[i].expected, caps[i].expected_size, caps[i].todo_size, 0.000005); GdipDeletePen(pen);