gdiplus: Construction/desctruction tests for PathIterator.

This commit is contained in:
Nikolay Sivov 2008-07-03 10:42:13 +04:00 committed by Alexandre Julliard
parent 91be02c085
commit d93ad02216
1 changed files with 29 additions and 0 deletions

View File

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