From 919d9facea33b8d3da30bfdb62ccfecb19db0cd5 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 29 Nov 2016 08:18:31 +0300 Subject: [PATCH] gdiplus/tests: Some tests for GdipGetPenCompoundCount(). Signed-off-by: Nikolay Sivov Signed-off-by: Vincent Povirk Signed-off-by: Alexandre Julliard --- 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 8591a3adc49..2cdb44a651e 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 0c40223f754..101d73dca5d 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.11.4.GIT