gdiplus: fillPath and strokePath parameters cannot be used at the same time for GdipCreateCustomLineCap
-- v2: gdiplus: fillPath and strokePath parameters cannot be used at the same time for GdipCreateCustomLineCap
From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/customlinecap.c | 6 +++++- dlls/gdiplus/tests/customlinecap.c | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/customlinecap.c b/dlls/gdiplus/customlinecap.c index f35fea90eba..1e0ba9203ff 100644 --- a/dlls/gdiplus/customlinecap.c +++ b/dlls/gdiplus/customlinecap.c @@ -115,9 +115,13 @@ GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath
TRACE("%p %p %d %f %p\n", fillPath, strokePath, baseCap, baseInset, customCap);
- if(!customCap || !(fillPath || strokePath)) + if (!customCap || !(fillPath || strokePath)) return InvalidParameter;
+ /* The fillPath and strokePath parameters cannot be used at the same time */ + if (fillPath && strokePath) + return NotImplemented; + *customCap = heap_alloc_zero(sizeof(GpCustomLineCap)); if(!*customCap) return OutOfMemory;
diff --git a/dlls/gdiplus/tests/customlinecap.c b/dlls/gdiplus/tests/customlinecap.c index a8bb5cf371b..8a2bbb91c46 100644 --- a/dlls/gdiplus/tests/customlinecap.c +++ b/dlls/gdiplus/tests/customlinecap.c @@ -54,12 +54,12 @@ static void test_constructor_destructor(void)
stat = GdipCreatePath(FillModeAlternate, &path); expect(Ok, stat); - stat = GdipAddPathRectangle(path, 5.0, 5.0, 10.0, 10.0); + stat = GdipAddPathRectangle(path, -5.0, -4.0, 10.0, 8.0); expect(Ok, stat);
stat = GdipCreatePath(FillModeAlternate, &path2); expect(Ok, stat); - stat = GdipAddPathRectangle(path2, 5.0, 5.0, 10.0, 10.0); + stat = GdipAddPathRectangle(path2, -5.0, -5.0, 10.0, 10.0); expect(Ok, stat);
/* NULL args */ @@ -74,12 +74,27 @@ static void test_constructor_destructor(void) stat = GdipDeleteCustomLineCap(NULL); expect(InvalidParameter, stat);
+ /* The fillPath and strokePath parameters cannot be used at the same time */ + custom = NULL; + stat = GdipCreateCustomLineCap(path, path2, LineCapFlat, 0.0, &custom); + expect(NotImplemented, stat); + ok(custom == NULL, "Expected a failure on creation\n"); + /* valid args */ + custom = NULL; stat = GdipCreateCustomLineCap(NULL, path2, LineCapFlat, 0.0, &custom); expect(Ok, stat); + ok(custom != NULL, "Custom line cap was not created\n"); stat = GdipDeleteCustomLineCap(custom); expect(Ok, stat); + /* it's strange but native returns NotImplemented on stroke == NULL */ + custom = NULL; + stat = GdipCreateCustomLineCap(path, NULL, LineCapTriangle, 0.0, &custom); + todo_wine expect(NotImplemented, stat); + todo_wine ok(custom == NULL, "Expected a failure on creation\n"); + if(stat == Ok) GdipDeleteCustomLineCap(custom); + custom = NULL; stat = GdipCreateCustomLineCap(path, NULL, LineCapFlat, 10.0, &custom); todo_wine expect(NotImplemented, stat);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=135971
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w7u_adm (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w7u_el (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w8 (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w8adm (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w864 (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w1064v1507 (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w1064v1809 (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w1064_tsign (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w10pro64 (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w11pro64 (32 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w7pro64 (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w864 (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w1064v1507 (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w1064v1809 (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w1064_2qxl (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w1064_adm (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w1064_tsign (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w10pro64 (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w10pro64_en_AE_u8 (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w10pro64_ar (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w10pro64_ja (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w10pro64_zh_CN (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation
=== w11pro64_amd (64 bit report) ===
gdiplus: customlinecap.c:80: Test failed: Expected 00000006, got 00000000 customlinecap.c:81: Test failed: Expected a failure on creation customlinecap.c:94: Test failed: Expected 00000006, got 00000000 customlinecap.c:95: Test failed: Expected a failure on creation customlinecap.c:100: Test failed: Expected 00000006, got 00000000 customlinecap.c:101: Test failed: Expected a failure on creation