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

Alexandre Julliard julliard at winehq.org
Wed Oct 13 11:43:15 CDT 2010


Module: wine
Branch: master
Commit: b20e75f5e903e5e785f0e4c6d53efe0cf2cfb74a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b20e75f5e903e5e785f0e4c6d53efe0cf2cfb74a

Author: Austin Lund <austin.lund at gmail.com>
Date:   Mon Oct 11 13:46:31 2010 +1000

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

---

 dlls/riched20/tests/txtsrv.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
index 894ff92..72152fc 100644
--- a/dlls/riched20/tests/txtsrv.c
+++ b/dlls/riched20/tests/txtsrv.c
@@ -726,15 +726,14 @@ static void test_TxGetNaturalSize(void) {
         goto cleanup;
     }
 
+    SetLastError(0xdeadbeef);
     result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT,
                                             hdcDraw, NULL, NULL,
                                             TXTNS_FITTOCONTENT, &psizelExtent,
                                             &xdim, &ydim);
-    todo_wine ok(result == S_OK, "TxGetNaturalSize failed (result = %x)\n", result);
-    if (result != S_OK) {
-        skip("TxGetNaturalSize measurements failed\n");
-        goto cleanup;
-    }
+    todo_wine ok(result == S_OK || broken(result == E_FAIL), /* WINXP Arabic Language */
+        "TxGetNaturalSize gave unexpected return value (result = %x)\n", result);
+    if (result == S_OK) {
     todo_wine ok(ydim == tmInfo_text.tmHeight,
                  "Height calculated incorrectly (expected %d, got %d)\n",
                  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,
                  "Width calculated incorrectly (expected %d {+1}, got %d)\n",
                  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:
     RestoreDC(hdcDraw,1);




More information about the wine-cvs mailing list