[PATCH 1/2] gdiplus/tests: Some tests for GdipGetPenCompoundCount()
Nikolay Sivov
nsivov at codeweavers.com
Mon Nov 28 23:18:31 CST 2016
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
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);
--
2.10.2
More information about the wine-patches
mailing list