Commit ba095677 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Test for the lowest rejected startup version.

parent 3f232785
...@@ -33,21 +33,28 @@ static void test_startup(void) ...@@ -33,21 +33,28 @@ static void test_startup(void)
Status status; Status status;
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; ULONG_PTR gdiplusToken;
int gpversion;
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
gdiplusStartupInput.SuppressBackgroundThread = 0; gdiplusStartupInput.SuppressBackgroundThread = 0;
gdiplusStartupInput.SuppressExternalCodecs = 0; gdiplusStartupInput.SuppressExternalCodecs = 0;
status = GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); for (gpversion=1; gpversion<256; gpversion++)
expect(Ok, status); {
GdiplusShutdown(gdiplusToken); gdiplusStartupInput.GdiplusVersion = gpversion;
status = GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
gdiplusStartupInput.GdiplusVersion = 42; ok(status == Ok || status == UnsupportedGdiplusVersion,
"GdiplusStartup returned %x\n", status);
status = GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); GdiplusShutdown(gdiplusToken);
expect(UnsupportedGdiplusVersion, status); if (status != Ok)
GdiplusShutdown(gdiplusToken); {
gpversion--;
break;
}
}
ok(gpversion > 0 && gpversion < 42, "unexpected gdiplus version %i\n", gpversion);
trace("gdiplus version is %i\n", gpversion);
status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen);
......
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