gdi32/tests: From Vista onwards TabbedTextOut ignores justification, so remove that bit of the test.

This commit is contained in:
Huw Davies 2009-02-18 12:17:55 +00:00 committed by Alexandre Julliard
parent de4f3fd4b9
commit f4e3e18b42
1 changed files with 1 additions and 10 deletions

View File

@ -1292,7 +1292,6 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea)
{ {
INT x, y, INT x, y,
breakCount, breakCount,
outputWidth = 0, /* to test TabbedTextOut() */
justifiedWidth = 0, /* to test GetTextExtentExPointW() */ justifiedWidth = 0, /* to test GetTextExtentExPointW() */
areaWidth = clientArea->right - clientArea->left, areaWidth = clientArea->right - clientArea->left,
nErrors = 0, e; nErrors = 0, e;
@ -1304,7 +1303,6 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea)
{ {
char extent[100]; char extent[100];
int GetTextExtentExPointWWidth; int GetTextExtentExPointWWidth;
int TabbedTextOutWidth;
} error[10]; } error[10];
GetTextMetricsA(hdc, &tm); GetTextMetricsA(hdc, &tm);
@ -1350,15 +1348,11 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea)
x = clientArea->left; x = clientArea->left;
outputWidth = LOWORD(TabbedTextOut(
hdc, x, y, pFirstChar, pLastChar - pFirstChar,
0, NULL, 0));
/* catch errors and report them */ /* catch errors and report them */
if (!lastExtent && ((outputWidth != areaWidth) || (justifiedWidth != areaWidth))) if (!lastExtent && (justifiedWidth != areaWidth))
{ {
memset(error[nErrors].extent, 0, 100); memset(error[nErrors].extent, 0, 100);
memcpy(error[nErrors].extent, pFirstChar, pLastChar - pFirstChar); memcpy(error[nErrors].extent, pFirstChar, pLastChar - pFirstChar);
error[nErrors].TabbedTextOutWidth = outputWidth;
error[nErrors].GetTextExtentExPointWWidth = justifiedWidth; error[nErrors].GetTextExtentExPointWWidth = justifiedWidth;
nErrors++; nErrors++;
} }
@ -1369,9 +1363,6 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea)
for (e = 0; e < nErrors; e++) for (e = 0; e < nErrors; e++)
{ {
ok(near_match(error[e].TabbedTextOutWidth, areaWidth),
"The output text (\"%s\") width should be %d, not %d.\n",
error[e].extent, areaWidth, error[e].TabbedTextOutWidth);
/* The width returned by GetTextExtentPoint32() is exactly the same /* The width returned by GetTextExtentPoint32() is exactly the same
returned by GetTextExtentExPointW() - see dlls/gdi32/font.c */ returned by GetTextExtentExPointW() - see dlls/gdi32/font.c */
ok(error[e].GetTextExtentExPointWWidth == areaWidth, ok(error[e].GetTextExtentExPointWWidth == areaWidth,