riched20/tests: Cleaned up ITextServices::TxGetNaturalSize test and fixed test failures.

This commit is contained in:
Austin Lund 2010-10-11 13:46:31 +10:00 committed by Alexandre Julliard
parent 2c9b24b054
commit b20e75f5e9
1 changed files with 7 additions and 5 deletions

View File

@ -726,15 +726,14 @@ static void test_TxGetNaturalSize(void) {
goto cleanup; goto cleanup;
} }
SetLastError(0xdeadbeef);
result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT,
hdcDraw, NULL, NULL, hdcDraw, NULL, NULL,
TXTNS_FITTOCONTENT, &psizelExtent, TXTNS_FITTOCONTENT, &psizelExtent,
&xdim, &ydim); &xdim, &ydim);
todo_wine ok(result == S_OK, "TxGetNaturalSize failed (result = %x)\n", result); todo_wine ok(result == S_OK || broken(result == E_FAIL), /* WINXP Arabic Language */
if (result != S_OK) { "TxGetNaturalSize gave unexpected return value (result = %x)\n", result);
skip("TxGetNaturalSize measurements failed\n"); if (result == S_OK) {
goto cleanup;
}
todo_wine ok(ydim == tmInfo_text.tmHeight, todo_wine ok(ydim == tmInfo_text.tmHeight,
"Height calculated incorrectly (expected %d, got %d)\n", "Height calculated incorrectly (expected %d, got %d)\n",
tmInfo_text.tmHeight, ydim); tmInfo_text.tmHeight, ydim);
@ -742,6 +741,9 @@ static void test_TxGetNaturalSize(void) {
todo_wine ok(xdim >= charwidth_caps_text[0] && xdim <= charwidth_caps_text[0] + 1, todo_wine ok(xdim >= charwidth_caps_text[0] && xdim <= charwidth_caps_text[0] + 1,
"Width calculated incorrectly (expected %d {+1}, got %d)\n", "Width calculated incorrectly (expected %d {+1}, got %d)\n",
charwidth_caps_text[0], xdim); charwidth_caps_text[0], xdim);
} else
skip("TxGetNaturalSize measurements not performed (xdim = %d, ydim = %d, result = %x, error = %x)\n",
xdim, ydim, result, GetLastError());
cleanup: cleanup:
RestoreDC(hdcDraw,1); RestoreDC(hdcDraw,1);