Lei Zhang : user32: Add more DrawText tests.

Alexandre Julliard julliard at winehq.org
Fri Mar 28 10:02:43 CDT 2008


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

Author: Lei Zhang <thestig at google.com>
Date:   Thu Mar 27 10:58:08 2008 -0700

user32: Add more DrawText tests.

---

 dlls/user32/tests/text.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/tests/text.c b/dlls/user32/tests/text.c
index 01bd306..1e09650 100644
--- a/dlls/user32/tests/text.c
+++ b/dlls/user32/tests/text.c
@@ -147,6 +147,23 @@ static void test_DrawTextCalcRect(void)
                 "rectangle should NOT be empty.\n");
     }
 
+    /* More test cases from bug 12226 */
+    SetRect(&rect, 0, 0, 0, 0);
+    textheight = DrawTextA(hdc, emptystring, -1, &rect, DT_CALCRECT | DT_LEFT | DT_SINGLELINE);
+    todo_wine ok(textheight, "DrawTextA error %u\n", GetLastError());
+    ok(0 == rect.left, "expected 0, got %d\n", rect.left);
+    ok(0 == rect.right, "expected 0, got %d\n", rect.right);
+    ok(0 == rect.top, "expected 0, got %d\n", rect.top);
+    todo_wine ok(rect.bottom, "rect.bottom should not be 0\n");
+
+    SetRect(&rect, 0, 0, 0, 0);
+    textheight = DrawTextW(hdc, emptystringW, -1, &rect, DT_CALCRECT | DT_LEFT | DT_SINGLELINE);
+    todo_wine ok(textheight, "DrawTextW error %u\n", GetLastError());
+    ok(0 == rect.left, "expected 0, got %d\n", rect.left);
+    ok(0 == rect.right, "expected 0, got %d\n", rect.right);
+    ok(0 == rect.top, "expected 0, got %d\n", rect.top);
+    todo_wine ok(rect.bottom, "rect.bottom should not be 0\n");
+
     SelectObject(hdc, hOldFont);
     ret = DeleteObject(hFont);
     ok( ret, "DeleteObject error %u\n", GetLastError());




More information about the wine-cvs mailing list