gdiplus: Add a test for creating a nonexistent font with GdipCreateFontFromLogfont.

This commit is contained in:
Dmitry Timoshkov 2012-06-19 12:05:17 +09:00 committed by Alexandre Julliard
parent bc66ef043f
commit eeb52474c1
1 changed files with 5 additions and 0 deletions

View File

@ -105,6 +105,11 @@ static void test_logfont(void)
memset(&lfa, 0, sizeof(LOGFONTA)); memset(&lfa, 0, sizeof(LOGFONTA));
memset(&lfa2, 0xff, sizeof(LOGFONTA)); memset(&lfa2, 0xff, sizeof(LOGFONTA));
lstrcpyA(lfa.lfFaceName, "Nonexistent font");
stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font);
ok(stat == NotTrueTypeFont || broken(stat == FileNotFound), /* before XP */
"expected NotTrueTypeFont, got %d\n", stat);
/* empty FaceName */ /* empty FaceName */
lfa.lfFaceName[0] = 0; lfa.lfFaceName[0] = 0;
stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font);