Royal Chan : gdiplus: Added conformance tests for GdipDrawLineI.
Alexandre Julliard
julliard at winehq.org
Tue Feb 26 05:45:20 CST 2008
Module: wine
Branch: master
Commit: b83abb61221ff3b0d62d9afa210aac281d8deca3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b83abb61221ff3b0d62d9afa210aac281d8deca3
Author: Royal Chan <chanroyal at gmail.com>
Date: Mon Feb 25 21:08:01 2008 -0800
gdiplus: Added conformance tests for GdipDrawLineI.
---
dlls/gdiplus/tests/graphics.c | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index da61893..c3a3315 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -346,6 +346,44 @@ static void test_GdipDrawBezierI(void)
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)
{
struct GdiplusStartupInput gdiplusStartupInput;
@@ -363,6 +401,7 @@ START_TEST(graphics)
test_GdipDrawBezierI();
test_GdipDrawArc();
test_GdipDrawArcI();
+ test_GdipDrawLineI();
GdiplusShutdown(gdiplusToken);
}
More information about the wine-cvs
mailing list