Nikolay Sivov : gdiplus/tests: Some tests for GdipGetPenCompoundCount().

Alexandre Julliard julliard at winehq.org
Tue Nov 29 16:01:39 CST 2016


Module: wine
Branch: master
Commit: 919d9facea33b8d3da30bfdb62ccfecb19db0cd5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=919d9facea33b8d3da30bfdb62ccfecb19db0cd5

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Nov 29 08:18:31 2016 +0300

gdiplus/tests: Some tests for GdipGetPenCompoundCount().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/tests/pen.c | 19 +++++++++++++++++++
 include/gdiplusflat.h    |  1 +
 2 files changed, 20 insertions(+)

diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c
index 8591a3a..2cdb44a 100644
--- a/dlls/gdiplus/tests/pen.c
+++ b/dlls/gdiplus/tests/pen.c
@@ -344,6 +344,7 @@ static void test_compoundarray(void)
     GpStatus status;
     GpPen *pen;
     static const REAL testvalues[] = {0.2, 0.4, 0.6, 0.8};
+    INT count;
 
     status = GdipSetPenCompoundArray(NULL, testvalues, 4);
     expect(InvalidParameter, status);
@@ -351,6 +352,18 @@ static void test_compoundarray(void)
     status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen);
     expect(Ok, status);
 
+    status = GdipGetPenCompoundCount(NULL, NULL);
+    expect(InvalidParameter, status);
+
+    status = GdipGetPenCompoundCount(pen, NULL);
+    expect(InvalidParameter, status);
+
+    count = 10;
+    status = GdipGetPenCompoundCount(pen, &count);
+todo_wine {
+    expect(Ok, status);
+    ok(count == 0, "Unexpected compound count %d\n", count);
+}
     status = GdipSetPenCompoundArray(pen, NULL, 4);
     expect(InvalidParameter, status);
     status = GdipSetPenCompoundArray(pen, testvalues, 3);
@@ -363,6 +376,12 @@ static void test_compoundarray(void)
     status = GdipSetPenCompoundArray(pen, testvalues, 4);
     todo_wine expect(Ok, status);
 
+    count = 0;
+    status = GdipGetPenCompoundCount(pen, &count);
+todo_wine {
+    expect(Ok, status);
+    ok(count == 4, "Unexpected compound count %d\n", count);
+}
     GdipDeletePen(pen);
 }
 
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 0c40223..101d73d 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -616,6 +616,7 @@ GpStatus WINGDIPAPI GdipCreatePen2(GpBrush*,REAL,GpUnit,GpPen**);
 GpStatus WINGDIPAPI GdipDeletePen(GpPen*);
 GpStatus WINGDIPAPI GdipGetPenBrushFill(GpPen*,GpBrush**);
 GpStatus WINGDIPAPI GdipGetPenColor(GpPen*,ARGB*);
+GpStatus WINGDIPAPI GdipGetPenCompoundCount(GpPen*,INT*);
 GpStatus WINGDIPAPI GdipGetPenCustomStartCap(GpPen*,GpCustomLineCap**);
 GpStatus WINGDIPAPI GdipGetPenCustomEndCap(GpPen*,GpCustomLineCap**);
 GpStatus WINGDIPAPI GdipGetPenDashArray(GpPen*,REAL*,INT);




More information about the wine-cvs mailing list