Andrew Eikum aeikum@codeweavers.com wrote:
+static void test_GdipGraphicsSetAbort(void) +{
- HDC hdc = GetDC(hwnd);
- GpStatus status;
- GpGraphics *graphics;
- if (!pGdipGraphicsSetAbort)
- {
win_skip("GdipGraphicsSetAbort() is not supported.\n");
return;
hdc is leaked.
- }
- status = GdipCreateFromHDC(hdc, &graphics);
- expect(Ok, status);
- status = pGdipGraphicsSetAbort(NULL, NULL);
- expect(InvalidParameter, status);
- status = pGdipGraphicsSetAbort(graphics, NULL);
- expect(Ok, status);
- ReleaseDC(hwnd, hdc);
+}
graphics is leaked.
Also, it would be useful to test not invalid input as well.