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)
Status status;
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
int gpversion;
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;
gdiplusStartupInput.SuppressBackgroundThread = 0;
gdiplusStartupInput.SuppressExternalCodecs = 0;
status = GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
expect(Ok, status);
GdiplusShutdown(gdiplusToken);
gdiplusStartupInput.GdiplusVersion = 42;
status = GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
expect(UnsupportedGdiplusVersion, status);
GdiplusShutdown(gdiplusToken);
for (gpversion=1; gpversion<256; gpversion++)
{
gdiplusStartupInput.GdiplusVersion = gpversion;
status = GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
ok(status == Ok || status == UnsupportedGdiplusVersion,
"GdiplusStartup returned %x\n", status);
GdiplusShutdown(gdiplusToken);
if (status != Ok)
{
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);
......
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