gdiplus/tests: Fix some leaks when running with Wine (Valgrind).
This commit is contained in:
parent
db49dec825
commit
d68dde3751
|
@ -798,17 +798,23 @@ static void test_font_substitution(void)
|
||||||
lf.lfWeight = 0;
|
lf.lfWeight = 0;
|
||||||
lf.lfCharSet = 0;
|
lf.lfCharSet = 0;
|
||||||
lstrcpyA(lf.lfFaceName, "ThisFontShouldNotExist");
|
lstrcpyA(lf.lfFaceName, "ThisFontShouldNotExist");
|
||||||
|
font = NULL;
|
||||||
status = GdipCreateFontFromLogfontA(hdc, &lf, &font);
|
status = GdipCreateFontFromLogfontA(hdc, &lf, &font);
|
||||||
todo_wine
|
todo_wine
|
||||||
ok(status == NotTrueTypeFont || broken(status == FileNotFound), /* before XP */
|
ok(status == NotTrueTypeFont || broken(status == FileNotFound), /* before XP */
|
||||||
"expected NotTrueTypeFont, got %d\n", status);
|
"expected NotTrueTypeFont, got %d\n", status);
|
||||||
|
/* FIXME: remove when wine is fixed */
|
||||||
|
if (font) GdipDeleteFont(font);
|
||||||
|
|
||||||
/* empty FaceName */
|
/* empty FaceName */
|
||||||
lf.lfFaceName[0] = 0;
|
lf.lfFaceName[0] = 0;
|
||||||
|
font = NULL;
|
||||||
status = GdipCreateFontFromLogfontA(hdc, &lf, &font);
|
status = GdipCreateFontFromLogfontA(hdc, &lf, &font);
|
||||||
todo_wine
|
todo_wine
|
||||||
ok(status == NotTrueTypeFont || broken(status == FileNotFound), /* before XP */
|
ok(status == NotTrueTypeFont || broken(status == FileNotFound), /* before XP */
|
||||||
"expected NotTrueTypeFont, got %d\n", status);
|
"expected NotTrueTypeFont, got %d\n", status);
|
||||||
|
/* FIXME: remove when wine is fixed */
|
||||||
|
if (font) GdipDeleteFont(font);
|
||||||
|
|
||||||
GdipDeleteGraphics(graphics);
|
GdipDeleteGraphics(graphics);
|
||||||
DeleteDC(hdc);
|
DeleteDC(hdc);
|
||||||
|
|
Loading…
Reference in New Issue