Module: wine Branch: master Commit: d93ad02216d28851b2be07d8ee89671a7354761f URL: http://source.winehq.org/git/wine.git/?a=commit;h=d93ad02216d28851b2be07d8ee... Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Jul 3 10:42:13 2008 +0400 gdiplus: Construction/desctruction tests for PathIterator. --- dlls/gdiplus/tests/pathiterator.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/pathiterator.c b/dlls/gdiplus/tests/pathiterator.c index aa41e09..24c6990 100644 --- a/dlls/gdiplus/tests/pathiterator.c +++ b/dlls/gdiplus/tests/pathiterator.c @@ -24,6 +24,33 @@ #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) +static void test_constructor_destructor(void) +{ + GpPath *path; + GpPathIterator *iter; + GpStatus stat; + + GdipCreatePath(FillModeAlternate, &path); + GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0); + + /* NULL args */ + stat = GdipCreatePathIter(NULL, NULL); + expect(InvalidParameter, stat); + stat = GdipCreatePathIter(&iter, NULL); + expect(InvalidParameter, stat); + stat = GdipCreatePathIter(NULL, path); + expect(InvalidParameter, stat); + stat = GdipDeletePathIter(NULL); + expect(InvalidParameter, stat); + + /* valid args */ + stat = GdipCreatePathIter(&iter, path); + expect(Ok, stat); + + GdipDeletePathIter(iter); + GdipDeletePath(path); +} + START_TEST(pathiterator) { struct GdiplusStartupInput gdiplusStartupInput; @@ -36,5 +63,7 @@ START_TEST(pathiterator) GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); + test_constructor_destructor(); + GdiplusShutdown(gdiplusToken); }