Commit b83abb61 authored by Royal Chan's avatar Royal Chan Committed by Alexandre Julliard

gdiplus: Added conformance tests for GdipDrawLineI.

parent ea92872a
...@@ -346,6 +346,44 @@ static void test_GdipDrawBezierI(void) ...@@ -346,6 +346,44 @@ static void test_GdipDrawBezierI(void)
ReleaseDC(0, hdc); ReleaseDC(0, hdc);
} }
static void test_GdipDrawLineI(void)
{
GpStatus status;
GpGraphics *graphics = NULL;
GpPen *pen = NULL;
HDC hdc = GetDC(0);
/* make a graphics object and pen object */
status = GdipCreateFromHDC(hdc, &graphics);
expect(Ok, status);
ok(hdc != NULL, "Expected HDC to be initialized\n");
status = GdipCreateFromHDC(hdc, &graphics);
expect(Ok, status);
ok(graphics != NULL, "Expected graphics to be initialized\n");
status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen);
expect(Ok, status);
ok(pen != NULL, "Expected pen to be initialized\n");
/* InvalidParameter cases: null graphics, null pen */
status = GdipDrawLineI(NULL, NULL, 0, 0, 0, 0);
expect(InvalidParameter, status);
status = GdipDrawLineI(graphics, NULL, 0, 0, 0, 0);
expect(InvalidParameter, status);
status = GdipDrawLineI(NULL, pen, 0, 0, 0, 0);
expect(InvalidParameter, status);
/* successful case */
status = GdipDrawLineI(graphics, pen, 0, 0, 0, 0);
expect(Ok, status);
GdipDeletePen(pen);
ReleaseDC(0, hdc);
}
START_TEST(graphics) START_TEST(graphics)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
...@@ -363,6 +401,7 @@ START_TEST(graphics) ...@@ -363,6 +401,7 @@ START_TEST(graphics)
test_GdipDrawBezierI(); test_GdipDrawBezierI();
test_GdipDrawArc(); test_GdipDrawArc();
test_GdipDrawArcI(); test_GdipDrawArcI();
test_GdipDrawLineI();
GdiplusShutdown(gdiplusToken); GdiplusShutdown(gdiplusToken);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment