-- v3: gdiplus: initial support for GdipPathIterNextPathType gdiplus: add more test to GdipCreateCustomLineCap
From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/tests/customlinecap.c | 37 +++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/tests/customlinecap.c b/dlls/gdiplus/tests/customlinecap.c index a8bb5cf371b..a31934d137a 100644 --- a/dlls/gdiplus/tests/customlinecap.c +++ b/dlls/gdiplus/tests/customlinecap.c @@ -75,13 +75,44 @@ static void test_constructor_destructor(void) expect(InvalidParameter, stat);
/* valid args */ - stat = GdipCreateCustomLineCap(NULL, path2, LineCapFlat, 0.0, &custom); + custom = NULL; + stat = GdipCreateCustomLineCap(NULL, path2, LineCapTriangle, 0.0, &custom); + expect(Ok, stat); + ok(custom != NULL, "Custom line cap was not created\n"); + stat = GdipDeleteCustomLineCap(custom); + expect(Ok, stat); + + custom = NULL; + stat = GdipCreateCustomLineCap(path, path2, LineCapTriangle, 0.0, &custom); + expect(Ok, stat); + ok(custom != NULL, "Custom line cap was not created\n"); + stat = GdipDeleteCustomLineCap(custom); + expect(Ok, stat); + + /* if baseInset is too large compared to Cap size, then it returns NotImplemented */ + custom = NULL; + stat = GdipCreateCustomLineCap(path, path2, LineCapTriangle, 10.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, LineCapFlat, 0.0, &custom); + expect(InvalidParameter, stat); + ok(custom == NULL, "Expected a failure on creation\n"); + stat = GdipDeleteCustomLineCap(custom); + expect(Ok, stat); + + custom = NULL; + stat = GdipCreateCustomLineCap(path, NULL, LineCapFlat, 1.0, &custom); + todo_wine expect(NotImplemented, stat); + todo_wine ok(custom == NULL, "Expected a failure on creation\n"); + if(stat == Ok) GdipDeleteCustomLineCap(custom); + + /* if baseInset is too large compared to Cap size, then it returns NotImplemented */ custom = NULL; - stat = GdipCreateCustomLineCap(path, NULL, LineCapFlat, 10.0, &custom); + stat = GdipCreateCustomLineCap(path, NULL, LineCapFlat, 2.0, &custom); todo_wine expect(NotImplemented, stat); todo_wine ok(custom == NULL, "Expected a failure on creation\n"); if(stat == Ok) GdipDeleteCustomLineCap(custom);
From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/pathiterator.c | 25 +++++++++++++++++++++++-- dlls/gdiplus/tests/pathiterator.c | 18 ++++++++++++++++-- 2 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/pathiterator.c b/dlls/gdiplus/pathiterator.c index 2addbc3bc57..d4d9e73319a 100644 --- a/dlls/gdiplus/pathiterator.c +++ b/dlls/gdiplus/pathiterator.c @@ -295,12 +295,33 @@ GpStatus WINGDIPAPI GdipPathIterIsValid(GpPathIterator* iterator, BOOL* valid) GpStatus WINGDIPAPI GdipPathIterNextPathType(GpPathIterator* iter, INT* result, BYTE* type, INT* start, INT* end) { - FIXME("(%p, %p, %p, %p, %p) stub\n", iter, result, type, start, end); + // INT i; + TRACE("(%p, %p, %p, %p, %p)\n", iter, result, type, start, end);
- if(!iter || !result || !type || !start || !end) + if (!iter || !result || !type || !start || !end) return InvalidParameter;
+ if (iter->pathtype_pos >= iter->pathdata.Count) + { + *result = 0; + return Ok; + } + // iter->pathtype_pos++; + // *start = *end = iter->pathtype_pos; + // *type = iter->pathdata.Types[iter->pathtype_pos] & PathPointTypePathMarker; + + // if (iter->pathtype_pos < iter->pathdata.Count) { + // for (i = iter->pathtype_pos + 1; i < iter->pathdata.Count; i++) { + // if ((iter->pathdata.Types[i] & PathPointTypePathMarker) != *type) + // break; + // } + // *end = i; + // } + // *result = *end - *start; + + // return Ok; return NotImplemented; + }
GpStatus WINGDIPAPI GdipPathIterNextSubpathPath(GpPathIterator* iter, INT* result, diff --git a/dlls/gdiplus/tests/pathiterator.c b/dlls/gdiplus/tests/pathiterator.c index 9bd3ac5452e..a064352d3c4 100644 --- a/dlls/gdiplus/tests/pathiterator.c +++ b/dlls/gdiplus/tests/pathiterator.c @@ -512,10 +512,10 @@ static void test_nextpathtype(void) /* empty path */ start = end = result = (INT)0xdeadbeef; stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); - todo_wine expect(Ok, stat); + expect(Ok, stat); expect((INT)0xdeadbeef, start); expect((INT)0xdeadbeef, end); - todo_wine expect(0, result); + expect(0, result); GdipDeletePathIter(iter);
/* single figure */ @@ -531,6 +531,20 @@ static void test_nextpathtype(void) todo_wine expect(0, result); GdipDeletePathIter(iter);
+ // Create PathPointTypeBezier type + stat = GdipAddPathBezier(path, 10.0, 10.0, 20.0, 10.0, 20.0, 20.0, 30.0, 20.0); + expect(Ok, stat); + GdipCreatePathIter(&iter, path); + start = end = result = (INT)0xdeadbeef; + type = 255; /* out of range */ + stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); + todo_wine expect(Ok, stat); + expect((INT)0xdeadbeef, start); + expect((INT)0xdeadbeef, end); + expect(255, type); + todo_wine expect(0, result); + GdipDeletePathIter(iter); + stat = GdipAddPathEllipse(path, 0.0, 0.0, 35.0, 70.0); expect(Ok, stat); GdipCreatePathIter(&iter, path);
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=135959
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w7u_adm (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w7u_el (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w8 (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w8adm (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w864 (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w1064v1507 (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w1064v1809 (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w1064_tsign (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w10pro64 (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w11pro64 (32 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w7pro64 (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w864 (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w1064v1507 (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w1064v1809 (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w1064_2qxl (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w1064_adm (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w1064_tsign (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w10pro64 (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w10pro64_en_AE_u8 (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w10pro64_ar (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w10pro64_ja (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w10pro64_zh_CN (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== w11pro64_amd (64 bit report) ===
gdiplus: customlinecap.c:87: Test failed: Expected 00000000, got 00000006 customlinecap.c:88: Test failed: Custom line cap was not created customlinecap.c:90: Test failed: Expected 00000000, got 00000002 customlinecap.c:95: Test failed: Expected 00000000, got 00000006 customlinecap.c:96: Test failed: Custom line cap was not created customlinecap.c:98: Test failed: Expected 00000000, got 00000002 customlinecap.c:102: Test failed: Expected 00000002, got 00000006 customlinecap.c:105: Test failed: Expected 00000000, got 00000002
=== debian11 (32 bit report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation
=== debian11 (32 bit ar:MA report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation
=== debian11 (32 bit de report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation
=== debian11 (32 bit fr report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation
=== debian11 (32 bit he:IL report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation
=== debian11 (32 bit hi:IN report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation
=== debian11 (32 bit ja:JP report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation
=== debian11 (32 bit zh:CN report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation
=== debian11b (32 bit WoW report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation
=== debian11b (64 bit WoW report) ===
gdiplus: customlinecap.c:102: Test failed: Expected 00000002, got 00000000 customlinecap.c:103: Test failed: Expected a failure on creation