gdiplus/tests: Some tests for GdipGetPenCompoundCount().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-11-29 08:18:31 +03:00 committed by Alexandre Julliard
parent fae0f7309e
commit 919d9facea
2 changed files with 20 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);