Commit 52583589 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32/tests: Fix the expected GetTextMetrics() results on recent Windows.

parent 3bd1d1c6
...@@ -6527,7 +6527,7 @@ static void test_max_height(void) ...@@ -6527,7 +6527,7 @@ static void test_max_height(void)
DeleteObject(SelectObject(hdc, hfont_old)); DeleteObject(SelectObject(hdc, hfont_old));
/* test the largest value */ /* test the largest value */
lf.lfHeight = -((1 << 16) - 1); lf.lfHeight = -((1 << 14) - 1);
hfont = CreateFontIndirectA(&lf); hfont = CreateFontIndirectA(&lf);
hfont_old = SelectObject(hdc, hfont); hfont_old = SelectObject(hdc, hfont);
memset(&tm, 0, sizeof(tm)); memset(&tm, 0, sizeof(tm));
...@@ -6547,12 +6547,15 @@ static void test_max_height(void) ...@@ -6547,12 +6547,15 @@ static void test_max_height(void)
hfont_old = SelectObject(hdc, hfont); hfont_old = SelectObject(hdc, hfont);
memset(&tm, 0, sizeof(tm)); memset(&tm, 0, sizeof(tm));
r = GetTextMetricsA(hdc, &tm); r = GetTextMetricsA(hdc, &tm);
ok(r, "GetTextMetrics failed\n"); if (r)
ok(tm.tmHeight == tm1.tmHeight, {
"expected 1 ppem value (%ld), got %ld\n", tm1.tmHeight, tm.tmHeight); ok(r, "GetTextMetrics failed\n");
ok(tm.tmAveCharWidth == tm1.tmAveCharWidth, ok(tm.tmHeight == tm1.tmHeight,
"expected 1 ppem value (%ld), got %ld\n", tm1.tmAveCharWidth, tm.tmAveCharWidth); "expected 1 ppem value (%ld), got %ld\n", tm1.tmHeight, tm.tmHeight);
DeleteObject(SelectObject(hdc, hfont_old)); ok(tm.tmAveCharWidth == tm1.tmAveCharWidth,
"expected 1 ppem value (%ld), got %ld\n", tm1.tmAveCharWidth, tm.tmAveCharWidth);
DeleteObject(SelectObject(hdc, hfont_old));
}
winetest_pop_context(); winetest_pop_context();
} }
......
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