Evan Stade : gdiplus: Added constructor and destructor test for gdiplus paths.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jul 10 08:02:40 CDT 2007


Module: wine
Branch: master
Commit: fec9e5e8031ba35e840ad2804027e29d4d2b9c5f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fec9e5e8031ba35e840ad2804027e29d4d2b9c5f

Author: Evan Stade <estade at gmail.com>
Date:   Mon Jul  9 20:54:38 2007 -0700

gdiplus: Added constructor and destructor test for gdiplus paths.

---

 dlls/gdiplus/tests/Makefile.in    |    1 +
 dlls/gdiplus/tests/graphicspath.c |   58 +++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/dlls/gdiplus/tests/Makefile.in b/dlls/gdiplus/tests/Makefile.in
index 45853f6..4d8662a 100644
--- a/dlls/gdiplus/tests/Makefile.in
+++ b/dlls/gdiplus/tests/Makefile.in
@@ -7,6 +7,7 @@ IMPORTS   = gdiplus kernel32
 
 CTESTS = \
 	brush.c \
+	graphicspath.c \
 	pen.c
 
 @MAKE_TEST_RULES@
diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c
new file mode 100644
index 0000000..8dd9adf
--- /dev/null
+++ b/dlls/gdiplus/tests/graphicspath.c
@@ -0,0 +1,58 @@
+/*
+ * Unit test suite for paths
+ *
+ * Copyright (C) 2007 Google (Evan Stade)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "windows.h"
+#include "gdiplus.h"
+#include "wine/test.h"
+
+#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
+
+static void test_constructor_destructor(void)
+{
+    GpStatus status;
+    GpPath* path = NULL;
+
+    status = GdipCreatePath(FillModeAlternate, &path);
+    expect(Ok, status);
+    ok(path != NULL, "Expected path to be initialized\n");
+
+    status = GdipDeletePath(NULL);
+    expect(InvalidParameter, status);
+
+    status = GdipDeletePath(path);
+    expect(Ok, status);
+}
+
+START_TEST(graphicspath)
+{
+    struct GdiplusStartupInput gdiplusStartupInput;
+    ULONG_PTR gdiplusToken;
+
+    gdiplusStartupInput.GdiplusVersion              = 1;
+    gdiplusStartupInput.DebugEventCallback          = NULL;
+    gdiplusStartupInput.SuppressBackgroundThread    = 0;
+    gdiplusStartupInput.SuppressExternalCodecs      = 0;
+
+    GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
+
+    test_constructor_destructor();
+
+    GdiplusShutdown(gdiplusToken);
+}




More information about the wine-cvs mailing list